lkml.org 
[lkml]   [1999]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Migrating to larger numbers
o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s (david parsons)  wrote on 08.06.99 in <7jkq4o$buu@pell.pell.portland.or.us>:

> In article <linux.kernel.7jklun$hht$1@sh1.ro.com>,
> Chris Adams <cadams@ro.com> wrote:
> >Once upon a time, david parsons <o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s>
> >>said: In article <linux.kernel.7ITCO6lHw-B@khms.westfalen.de>,
> >>Kai Henningsen <kaih@khms.westfalen.de> wrote:
> >>>A struct timeval - indeed, any non-arithmetic type - depends on changing
> >>>the definition of the C language,
> >> The C programming language doesn't care what time_t is, because that's
> >> not part of the C programming language.

It is. ANSI X3.159-1989 defines this in 4.12.1 (page 171, line 15), and
ISO C in whatever the renumbered sections turned out as.

> >Why don't people read? According the K&R, 'time_t' is an arithmetic

K&R is right, but it's not the standard.

> I'm afraid it isn't, sorry; A conforming compiler will not complain
> one bit if you do your own system headers that define time_t as a
> union of pointers to arrays of floats.

There's no such thing as a "conforming compiler". The whole standard
doesn't talk about a compiler even once (at least in the normative parts).

There's just a "conforming implementation". Two kinds, in fact:
"freestanding" or "hosted".

The library and include files are part of the implementation, just as the
compiler is.

The above scenario *might* be a conformant freestanding implementation -
that is, one with minimal library support (float.h, limits.h, stdarg.h,
and stddef.h, only). It *cannot* be a conformant hosted implementation,
because it doesn't conform to 4.12.1.

And of course, the standard doesn't ever talk about when a conforming
implementation should complain about not being conformant. That would be
nonsensical.

MfG Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.065 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site