R
Robert Gamble
Robert Gamble schrieb:
<snip: Cast to double should force the value to type double
and appropriate truncation but does not>
Your interpretation is correct; in fact, even -ffloat-store is not
always enough to force gcc to conforming behaviour; see, for example, a
similar question by myself,
http://groups.google.de/group/comp.lang.c/browse_frm/thread/ed30d2f1380f0f1
This is a truly annoying feature of gcc.
Thanks for the response. It's unfortunate that gcc doesn't follow the
Standard in this regard, the -ffloat-store option inhibits storing any
floating point variables in registers which is overkill for those who just
want explicit narowing conversions to be honored. Hopefully this will be
addressed before c99-compliance is deemed complete but I won't hold my
breath.
Robert Gamble