This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/51446] -fno-trapping-math generates NaN constant with different sign


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51446

--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-12-08 20:37:11 UTC ---
I think the soft-fp code tries to generate particular target-specific NaNs 
because it's also used in the Linux kernel emulation of floating-point 
instructions - which is a use case where doing the same as particular 
hardware is desirable.

At the level of GCC compiling C code, the compiler provides the language 
semantics.  It doesn't provide the semantics of any particular choice of 
instructions someone might expect to be used to implement the source code 
- and in particular doesn't guarantee any choice of NaN where the language 
(and IEEE 754 as applicable) don't determine the choice of NaN.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]