This is the mail archive of the gcc-help@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: gcc 3.3: long long bug?


"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."


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