[tz] [PATCH] * zdump.c: Tune performance of -c with large numbers on 64-bit hosts.
Paul Eggert
eggert at cs.ucla.edu
Thu Aug 15 15:05:17 UTC 2013
Tony Finch wrote:
>> + if (INTMAX_MAX / SECSPER400YEARS < diff400)
>> > + return absolute_max_time;
> I think this is a constraint violation on 32 bit systems that don't have
> long long (e.g. C89), so it ought to cause a compilation error.
Thanks for the review.
Hmm, I don't see any constraint violation there.
Although that expression contains no variables and always returns the
same value, in the C standard a "constant expression" is
an expression that's *required* to be a constant, which is
something slightly different. As the standard doesn't
require this expression to be a constant, no constraint
is being violated here, and a C implementation is required
to compile and run the program.
Likewise for the other use of SECSPER400YEARS.
We may run into compilers that complain anyway, but I'd
rather wait until that happens before worrying about it.
More information about the tz
mailing list