This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.3: long long bug?
- From: Andreas Schwab <schwab at suse dot de>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>,Lev Assinovsky <LAssinovsky at algorithm dot aelita dot com>,<gcc-bugs at gcc dot gnu dot org>, <gcc-help at gcc dot gnu dot org>
- Date: Mon, 07 Apr 2003 15:11:33 +0200
- Subject: Re: gcc 3.3: long long bug?
- References: <BAB6E0B9.80ED%eljay@adobe.com>
John Love-Jensen <eljay at adobe dot com> writes:
|> Hi Andreas,
|>
|> > |> Append "LL" to the constant.
|> >
|> > That should not be needed.
|>
|> The "LL" should be needed, unless a "long long" is the same size as a
|> "long".
ITYM unless LONG_MAX >= 2^35.
|> The "long long" data type is an extension to the C (ISO 9989) and C++ (ISO
|> 14882) specs. As such, automatically sizing a numeric literal to "long
|> long" (like how a numeric literal that's too big for an "int" becomes an
|> "unsigned int", and then a "long" and then an "unsigned long") could cause
|> problems.
C99 already specifies the needed rules to make LL unnecessary. You are
right in that long long does not exist in Standard C++, but IMHO the
default for GNU C++ should be consistent with GNU C.
|> Unfortunately, requiring the "LL" suffix causes other headaches.
|>
|> I wonder when we'll have "long long long" (128-bit) and "long long long
|> long" (256-bit) numbers. With accompanying "LLL" and "LLLL" suffixes.
|> *sigh*
You can probably find big threads about that subject in the comp.std.c
archives.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, 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."