------- Comment #2 from manu at gcc dot gnu dot org 2006-12-09 14:28 ------- I believe that the culprit is a call to constant_expression_warning at c-typeck.c (store_init_value). The comment just above this call says "ANSI wants warnings about out-of-range constant initializers". However, if the out-of-range constant initialiser is the result of an operation, a warning has been emitted already by overflow_warning. If the out-of-range is the result of a value that overflowed when converted to the type of the variable, a warning should have been emitted by convert_and_check.
So my question is, are we required to emit a special (pedantic) warning for: int c= INT_MAX + 1; different from the warning we already give for: int c; c = INT_MAX + 1; ? -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org Last reconfirmed|2005-12-18 01:39:36 |2006-12-09 14:28:13 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19977