This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 math/21983] New: math.h build error with -fsignaling-nans


https://sourceware.org/bugzilla/show_bug.cgi?id=21983

            Bug ID: 21983
           Summary: math.h build error with -fsignaling-nans
           Product: glibc
           Version: 2.26
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: lnicola at dend dot ro
  Target Milestone: ---

My distribution (Arch Linux) just updated to glibc 2.26. Now the following code
no longer compiles (tested with gcc 7.1.1 and 7.2.0):

$ cat test.cpp
#include <math.h>

int main() {
    return 0;
}

$ g++ -fsignaling-nans test.cpp -o test
In file included from /usr/include/c++/7.2.0/cmath:45:0,
                 from /usr/include/c++/7.2.0/math.h:36,
                 from test.c:2:
/usr/include/math.h: In function ‘bool iszero(__T)’:
/usr/include/math.h:491:10: error: expected primary-expression before ‘float’
   return fpclassify (__val) == FP_ZERO;
          ^
/usr/include/math.h:491:10: error: expected primary-expression before ‘default’
   return fpclassify (__val) == FP_ZERO;
          ^
/usr/include/math.h:491:10: error: expected primary-expression before ‘long’
   return fpclassify (__val) == FP_ZERO;
          ^
/usr/include/math.h:491:10: error: found ‘:’ in nested-name-specifier, expected
‘::’
   return fpclassify (__val) == FP_ZERO;
          ^
/usr/include/math.h:491:10: error: ‘_Float128’ is not a class, namespace, or
enumeration
   return fpclassify (__val) == FP_ZERO;

```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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