This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/8139: Bad new INT64_C macro
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Philippe RIBET <philippe_ribet at hotmail dot com>
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org,nobody at gcc dot gnu dot org
- Date: Mon, 7 Oct 2002 11:17:48 +0100
- Subject: Re: preprocessor/8139: Bad new INT64_C macro
- References: <F128w7X2KhLZgPLJkig00010ccd@hotmail.com>
Philippe RIBET wrote:-
> >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))
But what is defining this macro? GCC, or your system? I don't
think it really matters, though.
Remember that with the new macro the token does not have L or LL
appended, and therefore has type int (before promotions) in an
arithmetic expression. This is what is causing the warning -
the integer is too big. You should probably add L or LL as
appropriate to your constants.
Neil.