bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird printf() behavior


From: Andreas Schwab
Subject: Re: weird printf() behavior
Date: Wed, 06 Aug 2003 11:39:26 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Matthias Urlichs <address@hidden> writes:

|> #include <stdio.h>
|> 
|> int main()
|> {
|>         float f = 1.1;
|>         double ff = f;
|>      
|>      /* Yes, the first two format arguments are swapped intentionally. */
|>         printf("%f, %llx, %lx, %f\n", *(long long *)&ff, f, *(long *)&f, f);

This is even more broken.

Andreas.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]