Re: gcc 4.6.1 double to long cast on 32bit systems

2012-08-01 Thread Ian Lance Taylor
On Wed, Aug 1, 2012 at 1:52 PM, Karsten Ahnert wrote: > > I am new to this list. If this is not the correct place for posting the > question I apologize for any inconvenience. This question should have gone to gcc-h...@gcc.gnu.org. Please take any followups to gcc-help. Thanks. > The following

gcc 4.6.1 double to long cast on 32bit systems

2012-08-01 Thread Karsten Ahnert
Hi, I am new to this list. If this is not the correct place for posting the question I apologize for any inconvenience. The following code produces strange results on a 32 bit Linux system with gcc 4.6.1 (compilation with -m32): double val = 52.30582; double d = 3600.0 * 1000.0 * val; long l = l