mktime.c fixes (part 4 of 6): verify assumptions at compile-time

Richard Henderson rth@twiddle.net
Wed Dec 31 18:19:00 GMT 2003


On Wed, Dec 31, 2003 at 12:41:30AM -0800, Paul Eggert wrote:
> +/* The code also assumes that signed integer overflow silently wraps
> +   around, but this assumption can't be stated without causing a
> +   diagnostic on some hosts.  */

Such an assumption requires that you compile with -fwrapv with gcc.
Otherwise we may infer that a signed value cannot legitimately overflow,
and may reason based on that.


r~



More information about the Libc-alpha mailing list