On Sun, 21 Jan 2007, Manuel López-Ibáñez wrote:
> OK for mainline?
No, it is wrong to pedwarn for this, underflow must not be an error with
-pedantic-errors. The constraint in 6.4.4#2 is "The value of a constant
shall be in the range of representable values for its type." and
underflowing values are clearly within the range [-TYPE_MAX, TYPE_MAX].
It may also be wrong to pedwarn for overflow; at least one conformance
testsuite considers overflow to be a constraint violation that requires a
diagnostic (for which GCC uses pedwarn), but DR#025 for C90 says
overflowing values count as within the range [-inf,+inf].