GCC 3.1.1

Andreas Schwab schwab@suse.de
Fri Jun 28 02:47:00 GMT 2002


Jack Lloyd <lloyd@acm.jhu.edu> writes:

|> Basically:
|> 
|> unsigned long long x;
|> x = 1 << 32;
|> 
|> results in x == 0 rather than 0x100000000 as the code expects.

Actually this is already undefined by itself, and even x == 0 is not
guaranteed.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.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."



More information about the Gcc mailing list