question on double to int conversion

Geert Bosch bosch@gnat.com
Fri May 21 16:07:00 GMT 2004


On May 21, 2004, at 03:36, Jaeyoun Chung wrote:
|  However, on x86 gcc uses x87 instructions and register stack where 
possible
| so the x86 output uses an 80 bit double.

|  You could try -fstore-float to see if that gives the results you 
want.

well still doesn't work with -ffloat-store option.
No, that is expected. -ffloat-store is irrelevant here.
What you're doing is converting an out-of-range value to
integer. This is undefined and either answer is OK.



More information about the Gcc mailing list