[LLVMbugs] [Bug 10471] FLT_EVAL_METHOD sometimes wrong for Intel FPUs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 29 14:03:05 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10471

Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
          Component|new bugs                    |Frontend
            Version|2.8                         |trunk
         Resolution|INVALID                     |
         AssignedTo|unassignedbugs at nondot.org   |unassignedclangbugs at nondot.
                   |                            |org
            Product|new-bugs                    |clang

--- Comment #2 from Chris Lattner <clattner at apple.com> 2011-07-29 16:03:05 CDT ---
Howard asked me to reconsider this bug.  The standard says:

"If FLT_EVAL_METHOD equals 0, float_t and double_t shall be float and double,
respectively; if FLT_EVAL_METHOD equals 1, they shall both be double; if
FLT_EVAL_METHOD equals 2, they shall both be long double; for other values of
FLT_EVAL_METHOD, they are otherwise implementation-defined."

In practice, GCC and Clang implement FLT_EVAL_METHOD in <float.h> by just
forwarding the definition of __FLT_EVAL_METHOD__ (which is builtin) to
FLT_EVAL_METHOD.

GCC does set __FLT_EVAL_METHOD__ to 0 by default and to 2 with -mno-sse:

$ cat t.c
__FLT_EVAL_METHOD__
$ gcc -E t.c -std=gnu99 -mno-sse
..
2

So I agree that this should be fixed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list