asctime.c

Paul Eggert eggert at CS.UCLA.EDU
Mon Aug 2 15:58:48 UTC 2004


"Clive D.W. Feather" <clive at demon.net> writes:

>>     + sizeof(short) <= sizeof(int) <= sizeof(long)
>
> This one has gone.  This does allow a perverse implementation where
> long is 32 bits, all used, while short is 64 bits but only 17 of
> them are used. There are reasons (too off-topic to go into) why we
> did it this way.

It's not entirely off-topic for tz, as a bit of it (difftime.c) does
assume a relationship between sizeof and the range of values that can
be stored.  I suspect there is a reasonable amount of code that makes
the C89 sizeof assumptions, and which will silently go wrong of the
assumptions fail to hold.

Is there some place that documents why these sizeof assumptions were
removed in C99?  Are there actual C99 implementations that violate
these C89 assumptions?



More information about the tz mailing list