[Bug c/24599] [4.0/4.1 regression] Overflow for true value
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 4 15:28:00 GMT 2005
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-04 15:28 -------
Here is a testcase which is better representive of the issue (compile with
-std=c99 -pedantic-errors):
#include <stdbool.h>
int
main (int argc, char **argv)
{
if ((bool)((1527719483 + 1477819644))) {
}
return 0;
}
bool t1 = true;
--------------
t.c: In function ÂmainÂ:
t.c:6: warning: integer overflow in expression
t.c: At top level:
t.c:12: error: overflow in constant expression
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |c
Keywords| |diagnostic, rejects-valid
Known to fail|4.0.3 |4.0.3 4.1.0
Known to work|4.1.0 3.4.0 |3.4.0
Summary|[4.0 regression] segv after |[4.0/4.1 regression]
|overflow detection |Overflow for true value
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24599
More information about the Gcc-bugs
mailing list