[Bug target/82626] -msse and -mfpmath=sse Causes __FLT_EVAL_METHOD__ to be -1
keith.marshall at mailinator dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 20 14:03:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82626
Keith Marshall <keith.marshall at mailinator dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |keith.marshall at mailinator dot c
| |om
--- Comment #4 from Keith Marshall <keith.marshall at mailinator dot com> ---
(In reply to Jakub Jelinek from comment #3)
> (In reply to joseph@codesourcery.com from comment #2)
> > I think a value of 0 should be correct with -mfpmath=sse.
>
> For -msse2 -mfpmath=sse sure, and that is what you get.
> But for -mno-sse2 -msse -mfpmath=sse only float computations are done in
> SSE, double is done in x87.
If you're going to claim that argument, then your C++ <cmath> header is broken,
because you've just made the float_t and double_t data types indeterminate for
-mfpmath=sse prior to SSE2, yet you unconditionally refer to both in "uses"
clauses, (which requires typedefs from somewhere, yet you aren't providing
them; if you expect me to provide them in MinGW <math.h> -- which is where
Danny Smith originally provided them, but he neglected the "indeterminate" case
-- then I'm probably going to make both equivalent to X87 defaults -- i.e.
80-bit long double for both -- and you might just as well punt float to the X87
too. Thus, you've comprehensively broken support for pre-SSE2 -mfpmath=sse,
from GCC-6 onwards).
Sorry, but you can't have your cake, and eat it; one way or another, this is a
regression from GCC-5, which (correctly IMO, and in full agreement with Joseph)
set FLT_EVAL_METHOD to zero, for the OP's use case.
More information about the Gcc-bugs
mailing list