std::signbit etc. shouldn't be defined in C++98 mode. They shouldn't be in namespace std, but for -std=gnu++98 (not -std=c++98) we might want to leave them defined in the global namespace (that won't be possible for GNU/Linux unless/until we stop defining _GNU_SOURCE implicitly).
The simplest solution might be something like: --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -840,7 +840,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __builtin_isunordered(__type(__x), __type(__y)); } -#else +#elif !defined(__STRICT_ANSI__) template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,