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: "Lev Assinovsky" <LAssinovsky at algorithm dot aelita dot com>
- Cc: "A.R. Ashok Kumar" <ashokar at sankhya dot com>,"Eric Botcazou" <ebotcazou at libertysurf dot fr>, <gcc-help at gcc dot gnu dot org>
- Date: Mon, 07 Apr 2003 16:12:51 +0200
- Subject: Re: gcc 3.3: long long bug?
- References: <3F6F4712B759A34ABD453A8B39C10D624802C5@bagman.edm.com>
"Lev Assinovsky" <LAssinovsky at algorithm dot aelita dot com> writes:
|> No I meant MSVC 6.2 on Windows.
|> Yes, it works without any suffixes
|> with 3.2 on Unix.
|> Also this:
|> const long long n = 100000000 * 1000000000;
|>
|> works with 3.3 on Unix either.
Whatever you mean with "works". This is invoking undefined behaviour if
LONG_MAX < 100000000000000000, or INT_MAX >= 1000000000 and INT_MAX <
100000000000000000. The limits of long long are irrelevant here.
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."