[cfe-dev] default setting of -fmath-errno
eli.friedman at gmail.com
Fri Nov 11 13:57:37 CST 2011
On Fri, Nov 11, 2011 at 3:44 AM, Jay Foad <jay.foad at gmail.com> wrote:
> I was surprised by a difference between clang and gcc. On gcc, the
> docs for -fno-math-errno say:
> "This option is not turned on by any -O option since it can result in
> incorrect output for programs which depend on an exact implementation
> of IEEE or ISO rules/specifications for math functions."
> But with clang, it seems that when I turn on any optimization (-O1 or
> higher), I *do* get the effect of -fno-math-errno. Is this
Yes, intentional; see http://llvm.org/bugs/show_bug.cgi?id=5971. We
should probably document it somewhere, though...
More information about the cfe-dev