preprocessor/8139: Bad new INT64_C macro
Philippe RIBET
philippe_ribet@hotmail.com
Mon Oct 7 02:06:00 GMT 2002
The following reply was made to PR preprocessor/8139; it has been noted by GNATS.
From: "Philippe RIBET" <philippe_ribet@hotmail.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc: philippe_ribet@hotmail.com
Subject: Re: preprocessor/8139: Bad new INT64_C macro
Date: Mon, 07 Oct 2002 08:59:44 +0000
>What is the new definition? What is this macro?
Old macro was:
# if __WORDSIZE == 64
# define INT64_C(c) c ## L
# else
# define INT64_C(c) c ## LL
# endif
New macro is:
#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val))
(in file include/stdint.h)
This macro is part of ANSI C99 standard. It allows to specify integer
constant size.
>I suspect the warnings are correct, but new, and that the definition
of the macro is unchanged.
No, definition changed.
No, warnings are not correct as INT64_C(-3000000000) is valid code because
-3000000000 is valid 64bits integer.
>You should probably add a U to the relevant numbers.
??? 'U' with negative numbers ???
>Anyway, not a GCC bug.
Is IS a GCC bug if you consider ANSI C99 standard.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8139
--
Philippe Ribet
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the Gcc-prs
mailing list