This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bogus warning: integer constant too large
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Bogus warning: integer constant too large
- From: "Brad M. Garcia" <bgarcia at fore dot com>
- Date: Mon, 1 Mar 1999 13:48:57 -0500 (EST)
I've been able to produce this with both gcc 2.7.2.3 and egcs 1.1.1.
In both cases, it was on an x86 linux machine.
Here's a little test program to produce the bogus warning:
#include <stdio.h>
long foo1 = (-2147483648); /* produces the warning */
long foo2 = 0x80000000; /* doesn't produce the warning */
int main() {
if (foo1 == foo2) {
printf("They are the same!\n");
} else {
printf("They are different!\n");
}
return 0;
}
Brad Garcia
___/ __ / __ / ___/ "Being the Linux of digital media
__/ / / / _/ __/ would be a very good life."
_/ ____/ _/ _| ____/ - Jean-Louis Gassee, CEO of Be, Inc.