This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: preprocessor/8139: Bad new INT64_C macro


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]