This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Kill traditional mode
- From: Andreas Schwab <schwab at suse dot de>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: Zack Weinberg <zack at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 Feb 2002 22:52:28 +0100
- Subject: Re: Kill traditional mode
- References: <Pine.SOL.4.33.0202271953330.27008-100000@green.csi.cam.ac.uk>
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
|> On Wed, 27 Feb 2002, Zack Weinberg wrote:
|>
|> > This is because 2147483648 cannot fit in the type @code{int}, so
|> > -(following the ISO C rules) its data type is @code{unsigned long int}.
|> > -Negating this value yields 2147483648 again.
|> > -
|> > -@item
|> > -GCC does not substitute macro arguments when they appear inside of
|> > -string constants. For example, the following macro in GCC
|> > -
|> > -@example
|> > -#define foo(a) "a"
|> > -@end example
|> > +(following the ISO C rules) its data type is @code{unsigned int}.
|> > +Negating an unsigned 2147483648 yields 2147483648 again.
|>
|> That's an incorrect change; decimal constants in C90 go int, long,
|> unsigned long.
And for C99 it's int, long, long long, and 2147483648 is guaranteed to
fit in long long. On 64-bit platforms it already fits in long.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."