[Bug c/92083] New: -mlong-double-64 strange results

tydeman at tybor dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 14 01:26:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92083

            Bug ID: 92083
           Summary: -mlong-double-64 strange results
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tydeman at tybor dot com
  Target Milestone: ---

On an Intel 64-bit CPU (Core i5 7th gen), running Linux, gcc using
-mlong-double-64 gets strange results for long doubles in (at least) isnan()
and scanf().

For example, scanf() using "%Lg" to read into a long double, stores 10 bytes
(80-bit x87 format) instead of the expected 8 bytes (64-bit double format).

isnan() of a long double that is a NaN returns false.

Similar issues may also exists for <math.h> functions, printf(), <float.h>, and
<tgmath.h>.

Is there documentation on exactly what -mlong-double-64/80/128 are supposed to
do?  Are they supposed to link in different libraries?


More information about the Gcc-bugs mailing list