gcc 3.3: long long bug?
Andreas Schwab
schwab@suse.de
Mon Apr 7 14:04:00 GMT 2003
"A.R. Ashok Kumar" <ashokar@sankhya.com> writes:
|> Hi,
|>
|> > I think gcc 3.2 (which didn't give me any errors)
|> > behaves more properly, automatically converting
|> > rvalue to lvalue. Such behavior also solves
|> > "long long long ..." problems.
|>
|> Have you obtained correct result?
|>
|> For me, the following program gives wrong result(using gcc 2.7.2 on
|> sparc-sun-solaris2.3).
|>
|> ------
|> const long long n = 34359738368LL;
|> int main() {
|> printf("%ld\n", n);
Undefined behaviour. %ld expects long, but n is long long.
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-bugs
mailing list