This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/8139: Bad new INT64_C macro
- From: philippe_ribet at hotmail dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 4 Oct 2002 09:17:37 -0000
- Subject: preprocessor/8139: Bad new INT64_C macro
- Reply-to: philippe_ribet at hotmail dot com
>Number: 8139
>Category: preprocessor
>Synopsis: Bad new INT64_C macro
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 04 02:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: philippe_ribet@hotmail.com
>Release: 3.2
>Organization:
>Environment:
>Description:
Old INT64_C macro definition was value ## LL.
New definition is probably better but then the compiler has to be modified accordingly.
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
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: