This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug 24599
- From: Doug Evans <dje at transmeta dot com>
- To: gcc at gcc dot gnu dot org
- Cc: dje at transmeta dot com
- Date: Thu, 3 Nov 2005 12:13:45 -0800
- Subject: Re: bug 24599
- References: <bug-24599-7786@http.gcc.gnu.org/bugzilla/><20051103182520.19188.qmail@sourceware.org>
It seems like there's a whole range of issues once boolean_true_node
(or any such global tree node) has been clobbered.
#include <stdbool.h>
int
main (int argc, char **argv)
{
if ((bool)((1527719483 + 1477819644))) {
}
return 0;
}
bool t1 = true;
---
[dje@seba gcc]$ ./xgcc -B./ -O3 -S foo2.c -save-temps -pedantic
foo2.c: In function `main':
foo2.c:6: warning: integer overflow in expression
foo2.c: At top level:
foo2.c:12: warning: overflow in constant expression
[dje@seba gcc]$ ./xgcc -B./ -v
Reading specs from ./specs
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/tmp/junk
Thread model: posix
gcc version 4.1.0 20051026 (experimental)
[dje@seba gcc]$