preprocessor/8139: Bad new INT64_C macro

Neil Booth neil@daikokuya.co.uk
Fri Oct 4 15:16:00 GMT 2002


The following reply was made to PR preprocessor/8139; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: philippe_ribet@hotmail.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/8139: Bad new INT64_C macro
Date: Fri, 4 Oct 2002 23:05:58 +0100

 philippe_ribet@hotmail.com wrote:-
 
 > Old INT64_C macro definition was value ## LL.
 > 
 > New definition is probably better but then the compiler has to be modified accordingly.
 
 What is the new definition?  What is this macro?
 
 > Note that all values are valid 64 bit numbers.
 > The bug occured in the range -2^32+1 .. -2^31.
 > >How-To-Repeat:
 > #include <inttypes.h>
 > 
 > main(){
 >   int64_t v;
 > 
 >   v = INT64_C(-2147483648);
 >   v = INT64_C(-3000000000);
 >   v = INT64_C(-4000000000);
 >   v = INT64_C(-5000000000);
 > }
 > 
 > $ gcc t.c
 > t.c: In function `main':
 > t.c:6: warning: decimal constant is so large that it is unsigned
 > t.c:7: warning: decimal constant is so large that it is unsigned
 > t.c:8: warning: decimal constant is so large that it is unsigned
 
 I don't think this macro is defined by GCC.  Is it system specific?
 I suspect the warnings are correct, but new, and that the definition
 of the macro is unchanged.
 
 Neil.



More information about the Gcc-prs mailing list