[Bug libstdc++/69450] [6 Regression] libstdc++-v3/include/math.h:66:1 2: error: 'constexpr bool std::isnan(double)' conflicts with a previous declaration

danglin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 24 14:53:00 GMT 2016


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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 37447
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37447&action=edit
Patch

The attached include hack removes the XOPEN declaration for isnan.  It fixes
the build error but I'm not sure it is correct.  The macro defines for isnan
appear to be dependent on the declaration:

ia64 has

#        define _ISNAN(x)         
(_IS32(x)?_Isnanf(x):_IS64(x)?(isnan)(x):_Isn
anf80(x))

and hppa

#        define _ISNAN(x)          (_IS32(x)?_Isnanf(x):(isnan)(x))

On hpux10, there is no macro support.

So, I think we need to retain the declaration and use the defines from math.h.

I will try your patch.


More information about the Gcc-bugs mailing list