This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[v3, 4.9] Handle C++11 <math.h> overloads on Solaris 11, 12


With the latest Solaris 11.3 SRU, the C++11 <math.h> overloads have been
backported to Solaris 11.3.  While mainline and the gcc-5 branch already
cope with this due to

	https://gcc.gnu.org/ml/gcc-patches/2015-11/msg02075.html

this broke Solaris 11 bootstrap on the 4.9 branch.  Therefore I'd like
to backport the patch to the 4.9 branch, too.  The version applied to
the gcc-5 branch required a minimal change to the testcase only.

Bootstrapped on i386-pc-solaris2.11, ok for 4.9 branch?

	Rainer


2016-02-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Backport from mainline
	2015-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): New test.
	* configure.ac: Use it.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	* include/c_global/cmath [__cplusplus >= 201103L]
	(std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO.
	(std::isfinite): Likewise.
	(std::isinf): Likewise.
	(std::isnan): Likewise.
	(std::isnormal): Likewise.
	(std::signbit): Likewise.
	(std::isgreater): Likewise.
	(std::isgreaterequal): Likewise.
	(std::isless): Likewise.
	(std::islessequal): Likewise.
	(std::islessgreater): Likewise.
	(std::isunordered): Likewise.
	(std::acosh): Likewise.
	(std::asinh): Likewise.
	(std::atanh): Likewise.
	(std::cbrt): Likewise.
	(std::copysign): Likewise.
	(std::erf): Likewise.
	(std::erfc): Likewise.
	(std::exp2): Likewise.
	(std::expm1): Likewise.
	(std::fdim): Likewise.
	(std::fma): Likewise.
	(std::fmax): Likewise.
	(std::fmin): Likewise.
	(std::hypot): Likewise.
	(std::ilogb): Likewise.
	(std::lgamma): Likewise.
	(std::llrint): Likewise.
	(std::llround): Likewise.
	(std::log1p): Likewise.
	(std::log2): Likewise.
	(std::logb): Likewise.
	(std::lrint): Likewise.
	(std::lround): Likewise.
	(std::nearbyint): Likewise.
	(std::nextafter): Likewise.
	(std::nexttoward): Likewise.
	(std::remainder): Likewise.
	(std::remquo): Likewise.
	(std::rint): Likewise.
	(std::round): Likewise.
	(std::scalbln): Likewise.
	(std::scalbn): Likewise.
	(std::tgamma): Likewise.
	(std::trunc): Likewise.
	* include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1] (std::tr1::acosh):
	Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO.
	(std::tr1::asinh): Likewise.
	(std::tr1::atanh): Likewise.
	(std::tr1::cbrt): Likewise.
	(std::tr1::copysign): Likewise.
	(std::tr1::erf): Likewise.
	(std::tr1::erfc): Likewise.
	(std::tr1::exp2): Likewise.
	(std::tr1::expm1): Likewise.
	(std::tr1::fabs): Likewise.
	(std::tr1::fdim): Likewise.
	(std::tr1::fma): Likewise.
	(std::tr1::fmax): Likewise.
	(std::tr1::fmin): Likewise.
	(std::tr1::hypot): Likewise.
	(std::tr1::ilogb): Likewise.
	(std::tr1::lgamma): Likewise.
	(std::tr1::llrint): Likewise.
	(std::tr1::llround): Likewise.
	(std::tr1::log1p): Likewise.
	(std::tr1::log2): Likewise.
	(std::tr1::logb): Likewise.
	(std::tr1::lrint): Likewise.
	(std::tr1::lround): Likewise.
	(std::tr1::nearbyint): Likewise.
	(std::tr1::nextafter): Likewise.
	(std::tr1::nexttoward): Likewise.
	(std::tr1::remainder): Likewise.
	(std::tr1::remquo): Likewise.
	(std::tr1::rint): Likewise.
	(std::tr1::scalbln): Likewise.
	(std::tr1::scalbn): Likewise.
	(std::tr1::tgamma): Likewise.
	(std::tr1::trunc): Likewise.
	(std::tr1::pow): Likewise.

	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Restrict dg-xfail-if, dg-excess-errors to *-*-solaris2.10*.

# HG changeset patch
# Parent  55fc447d161a7966550a9bbfff90094cf0ddb9bf
Handle C++11 <math.h> overloads on Solaris 12

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1897,6 +1897,52 @@ AC_DEFUN([GLIBCXX_CHECK_STDIO_PROTO], [
 ])
 
 dnl
+dnl Check whether required C++11 overloads are present in <math.h>.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_MATH11_PROTO], [
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++11"
+
+  case "$host" in
+    *-*-solaris2.*)
+      # Solaris 12 introduced the C++11 <math.h> overloads.  A backport to
+      # a Solaris 11.3 SRU is likely, maybe even a Solaris 10 patch.
+      AC_MSG_CHECKING([for C++11 <math.h> overloads])
+      AC_CACHE_VAL(glibcxx_cv_math11_overload, [
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+	  [#include <math.h>
+	   #undef isfinite
+	   namespace std {
+	     inline bool isfinite(float __x)
+	     { return __builtin_isfinite(__x); }
+	   }
+	])],
+	[glibcxx_cv_math11_overload=no],
+	[glibcxx_cv_math11_overload=yes]
+      )])
+
+      # autoheader cannot handle indented templates.
+      AH_VERBATIM([__CORRECT_ISO_CPP11_MATH_H_PROTO],
+        [/* Define if all C++11 overloads are available in <math.h>.  */
+#if __cplusplus >= 201103L
+#undef __CORRECT_ISO_CPP11_MATH_H_PROTO
+#endif])
+
+      if test $glibcxx_cv_math11_overload = yes; then
+        AC_DEFINE(__CORRECT_ISO_CPP11_MATH_H_PROTO)
+      fi
+      AC_MSG_RESULT([$glibcxx_cv_math11_overload])
+      ;;
+  esac
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  AC_LANG_RESTORE
+])
+
+dnl
 dnl Check whether macros, etc are present for <system_error>
 dnl
 AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -178,6 +178,7 @@ GLIBCXX_ENABLE_VTABLE_VERIFY([no])
 
 # Checks for operating systems support that doesn't require linking.
 GLIBCXX_CHECK_STDIO_PROTO
+GLIBCXX_CHECK_MATH11_PROTO
 GLIBCXX_CHECK_SYSTEM_ERROR
 
 # For the streamoff typedef.
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -557,6 +557,8 @@ namespace std _GLIBCXX_VISIBILITY(defaul
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cplusplus >= 201103L
+
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr int
   fpclassify(float __x)
   { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
@@ -571,6 +573,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   fpclassify(long double __x)
   { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
 				FP_SUBNORMAL, FP_ZERO, __x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -578,6 +581,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     fpclassify(_Tp __x)
     { return __x != 0 ? FP_NORMAL : FP_ZERO; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isfinite(float __x)
   { return __builtin_isfinite(__x); }
@@ -589,6 +593,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isfinite(long double __x)
   { return __builtin_isfinite(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -596,6 +601,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     isfinite(_Tp __x)
     { return true; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isinf(float __x)
   { return __builtin_isinf(__x); }
@@ -607,6 +613,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isinf(long double __x)
   { return __builtin_isinf(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -614,6 +621,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     isinf(_Tp __x)
     { return false; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isnan(float __x)
   { return __builtin_isnan(__x); }
@@ -625,6 +633,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isnan(long double __x)
   { return __builtin_isnan(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -632,6 +641,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     isnan(_Tp __x)
     { return false; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isnormal(float __x)
   { return __builtin_isnormal(__x); }
@@ -643,6 +653,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isnormal(long double __x)
   { return __builtin_isnormal(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -650,6 +661,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     isnormal(_Tp __x)
     { return __x != 0 ? true : false; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   // The front-end doesn't provide a type generic builtin (libstdc++/58625).
   constexpr bool
   signbit(float __x)
@@ -662,6 +674,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   signbit(long double __x)
   { return __builtin_signbitl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
@@ -669,6 +682,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     signbit(_Tp __x)
     { return __x < 0 ? true : false; }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isgreater(float __x, float __y)
   { return __builtin_isgreater(__x, __y); }
@@ -680,6 +694,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isgreater(long double __x, long double __y)
   { return __builtin_isgreater(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -691,6 +706,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return __builtin_isgreater(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isgreaterequal(float __x, float __y)
   { return __builtin_isgreaterequal(__x, __y); }
@@ -702,6 +718,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isgreaterequal(long double __x, long double __y)
   { return __builtin_isgreaterequal(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -713,6 +730,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return __builtin_isgreaterequal(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isless(float __x, float __y)
   { return __builtin_isless(__x, __y); }
@@ -724,6 +742,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isless(long double __x, long double __y)
   { return __builtin_isless(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -735,6 +754,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return __builtin_isless(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   islessequal(float __x, float __y)
   { return __builtin_islessequal(__x, __y); }
@@ -746,6 +766,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   islessequal(long double __x, long double __y)
   { return __builtin_islessequal(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -757,6 +778,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return __builtin_islessequal(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   islessgreater(float __x, float __y)
   { return __builtin_islessgreater(__x, __y); }
@@ -768,6 +790,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   islessgreater(long double __x, long double __y)
   { return __builtin_islessgreater(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -779,6 +802,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return __builtin_islessgreater(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr bool
   isunordered(float __x, float __y)
   { return __builtin_isunordered(__x, __y); }
@@ -790,6 +814,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr bool
   isunordered(long double __x, long double __y)
   { return __builtin_isunordered(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename
@@ -1184,6 +1209,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   using ::truncl;
 
   /// Additional overloads.
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   acosh(float __x)
   { return __builtin_acoshf(__x); }
@@ -1191,6 +1217,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   acosh(long double __x)
   { return __builtin_acoshl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1198,6 +1225,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     acosh(_Tp __x)
     { return __builtin_acosh(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   asinh(float __x)
   { return __builtin_asinhf(__x); }
@@ -1205,6 +1233,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   asinh(long double __x)
   { return __builtin_asinhl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1212,6 +1241,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     asinh(_Tp __x)
     { return __builtin_asinh(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   atanh(float __x)
   { return __builtin_atanhf(__x); }
@@ -1219,6 +1249,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   atanh(long double __x)
   { return __builtin_atanhl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1226,6 +1257,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     atanh(_Tp __x)
     { return __builtin_atanh(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   cbrt(float __x)
   { return __builtin_cbrtf(__x); }
@@ -1233,6 +1265,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   cbrt(long double __x)
   { return __builtin_cbrtl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1240,6 +1273,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     cbrt(_Tp __x)
     { return __builtin_cbrt(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   copysign(float __x, float __y)
   { return __builtin_copysignf(__x, __y); }
@@ -1247,6 +1281,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   copysign(long double __x, long double __y)
   { return __builtin_copysignl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1256,6 +1291,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return copysign(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   erf(float __x)
   { return __builtin_erff(__x); }
@@ -1263,6 +1299,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   erf(long double __x)
   { return __builtin_erfl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1270,6 +1307,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     erf(_Tp __x)
     { return __builtin_erf(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   erfc(float __x)
   { return __builtin_erfcf(__x); }
@@ -1277,6 +1315,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   erfc(long double __x)
   { return __builtin_erfcl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1284,6 +1323,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     erfc(_Tp __x)
     { return __builtin_erfc(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   exp2(float __x)
   { return __builtin_exp2f(__x); }
@@ -1291,6 +1331,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   exp2(long double __x)
   { return __builtin_exp2l(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1298,6 +1339,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     exp2(_Tp __x)
     { return __builtin_exp2(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   expm1(float __x)
   { return __builtin_expm1f(__x); }
@@ -1305,6 +1347,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   expm1(long double __x)
   { return __builtin_expm1l(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1312,6 +1355,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     expm1(_Tp __x)
     { return __builtin_expm1(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   fdim(float __x, float __y)
   { return __builtin_fdimf(__x, __y); }
@@ -1319,6 +1363,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   fdim(long double __x, long double __y)
   { return __builtin_fdiml(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1328,6 +1373,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return fdim(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   fma(float __x, float __y, float __z)
   { return __builtin_fmaf(__x, __y, __z); }
@@ -1335,6 +1381,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   fma(long double __x, long double __y, long double __z)
   { return __builtin_fmal(__x, __y, __z); }
+#endif
 
   template<typename _Tp, typename _Up, typename _Vp>
     constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
@@ -1344,6 +1391,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return fma(__type(__x), __type(__y), __type(__z));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   fmax(float __x, float __y)
   { return __builtin_fmaxf(__x, __y); }
@@ -1351,6 +1399,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   fmax(long double __x, long double __y)
   { return __builtin_fmaxl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1360,6 +1409,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return fmax(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   fmin(float __x, float __y)
   { return __builtin_fminf(__x, __y); }
@@ -1367,6 +1417,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   fmin(long double __x, long double __y)
   { return __builtin_fminl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1376,6 +1427,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return fmin(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   hypot(float __x, float __y)
   { return __builtin_hypotf(__x, __y); }
@@ -1383,6 +1435,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   hypot(long double __x, long double __y)
   { return __builtin_hypotl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1392,6 +1445,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return hypot(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr int
   ilogb(float __x)
   { return __builtin_ilogbf(__x); }
@@ -1399,6 +1453,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr int
   ilogb(long double __x)
   { return __builtin_ilogbl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr
@@ -1407,6 +1462,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     ilogb(_Tp __x)
     { return __builtin_ilogb(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   lgamma(float __x)
   { return __builtin_lgammaf(__x); }
@@ -1414,6 +1470,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   lgamma(long double __x)
   { return __builtin_lgammal(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1421,6 +1478,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     lgamma(_Tp __x)
     { return __builtin_lgamma(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr long long
   llrint(float __x)
   { return __builtin_llrintf(__x); }
@@ -1428,6 +1486,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long long
   llrint(long double __x)
   { return __builtin_llrintl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1435,6 +1494,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     llrint(_Tp __x)
     { return __builtin_llrint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr long long
   llround(float __x)
   { return __builtin_llroundf(__x); }
@@ -1442,6 +1502,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long long
   llround(long double __x)
   { return __builtin_llroundl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1449,6 +1510,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     llround(_Tp __x)
     { return __builtin_llround(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   log1p(float __x)
   { return __builtin_log1pf(__x); }
@@ -1456,6 +1518,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   log1p(long double __x)
   { return __builtin_log1pl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1463,6 +1526,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     log1p(_Tp __x)
     { return __builtin_log1p(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   // DR 568.
   constexpr float
   log2(float __x)
@@ -1471,6 +1535,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   log2(long double __x)
   { return __builtin_log2l(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1478,6 +1543,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     log2(_Tp __x)
     { return __builtin_log2(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   logb(float __x)
   { return __builtin_logbf(__x); }
@@ -1485,6 +1551,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   logb(long double __x)
   { return __builtin_logbl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1492,6 +1559,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     logb(_Tp __x)
     { return __builtin_logb(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr long
   lrint(float __x)
   { return __builtin_lrintf(__x); }
@@ -1499,6 +1567,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long
   lrint(long double __x)
   { return __builtin_lrintl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1506,6 +1575,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     lrint(_Tp __x)
     { return __builtin_lrint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr long
   lround(float __x)
   { return __builtin_lroundf(__x); }
@@ -1513,6 +1583,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long
   lround(long double __x)
   { return __builtin_lroundl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1520,6 +1591,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     lround(_Tp __x)
     { return __builtin_lround(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   nearbyint(float __x)
   { return __builtin_nearbyintf(__x); }
@@ -1527,6 +1599,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   nearbyint(long double __x)
   { return __builtin_nearbyintl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1534,6 +1607,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     nearbyint(_Tp __x)
     { return __builtin_nearbyint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   nextafter(float __x, float __y)
   { return __builtin_nextafterf(__x, __y); }
@@ -1541,6 +1615,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   nextafter(long double __x, long double __y)
   { return __builtin_nextafterl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1550,6 +1625,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return nextafter(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   nexttoward(float __x, long double __y)
   { return __builtin_nexttowardf(__x, __y); }
@@ -1557,6 +1633,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   nexttoward(long double __x, long double __y)
   { return __builtin_nexttowardl(__x, __y); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1564,6 +1641,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     nexttoward(_Tp __x, long double __y)
     { return __builtin_nexttoward(__x, __y); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   remainder(float __x, float __y)
   { return __builtin_remainderf(__x, __y); }
@@ -1571,6 +1649,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   remainder(long double __x, long double __y)
   { return __builtin_remainderl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1580,6 +1659,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return remainder(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   remquo(float __x, float __y, int* __pquo)
   { return __builtin_remquof(__x, __y, __pquo); }
@@ -1587,6 +1667,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   inline long double
   remquo(long double __x, long double __y, int* __pquo)
   { return __builtin_remquol(__x, __y, __pquo); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -1596,6 +1677,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
       return remquo(__type(__x), __type(__y), __pquo);
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   rint(float __x)
   { return __builtin_rintf(__x); }
@@ -1603,6 +1685,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   rint(long double __x)
   { return __builtin_rintl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1610,6 +1693,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     rint(_Tp __x)
     { return __builtin_rint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   round(float __x)
   { return __builtin_roundf(__x); }
@@ -1617,6 +1701,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   round(long double __x)
   { return __builtin_roundl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1624,6 +1709,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     round(_Tp __x)
     { return __builtin_round(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   scalbln(float __x, long __ex)
   { return __builtin_scalblnf(__x, __ex); }
@@ -1631,6 +1717,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   scalbln(long double __x, long __ex)
   { return __builtin_scalblnl(__x, __ex); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1638,6 +1725,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     scalbln(_Tp __x, long __ex)
     { return __builtin_scalbln(__x, __ex); }
  
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   scalbn(float __x, int __ex)
   { return __builtin_scalbnf(__x, __ex); }
@@ -1645,6 +1733,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   scalbn(long double __x, int __ex)
   { return __builtin_scalbnl(__x, __ex); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1652,6 +1741,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     scalbn(_Tp __x, int __ex)
     { return __builtin_scalbn(__x, __ex); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   tgamma(float __x)
   { return __builtin_tgammaf(__x); }
@@ -1659,6 +1749,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   tgamma(long double __x)
   { return __builtin_tgammal(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -1666,6 +1757,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
     tgamma(_Tp __x)
     { return __builtin_tgamma(__x); }
  
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   constexpr float
   trunc(float __x)
   { return __builtin_truncf(__x); }
@@ -1673,6 +1765,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   constexpr long double
   trunc(long double __x)
   { return __builtin_truncl(__x); }
+#endif
 
   template<typename _Tp>
     constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
diff --git a/libstdc++-v3/include/tr1/cmath b/libstdc++-v3/include/tr1/cmath
--- a/libstdc++-v3/include/tr1/cmath
+++ b/libstdc++-v3/include/tr1/cmath
@@ -419,6 +419,7 @@ namespace tr1
   /// Additional overloads [8.16.4].
   using std::acos;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   acosh(float __x)
   { return __builtin_acoshf(__x); }
@@ -426,6 +427,7 @@ namespace tr1
   inline long double
   acosh(long double __x)
   { return __builtin_acoshl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -435,6 +437,7 @@ namespace tr1
 
   using std::asin;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   asinh(float __x)
   { return __builtin_asinhf(__x); }
@@ -442,6 +445,7 @@ namespace tr1
   inline long double
   asinh(long double __x)
   { return __builtin_asinhl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -452,6 +456,7 @@ namespace tr1
   using std::atan;
   using std::atan2;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   atanh(float __x)
   { return __builtin_atanhf(__x); }
@@ -459,6 +464,7 @@ namespace tr1
   inline long double
   atanh(long double __x)
   { return __builtin_atanhl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -466,6 +472,7 @@ namespace tr1
     atanh(_Tp __x)
     { return __builtin_atanh(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   cbrt(float __x)
   { return __builtin_cbrtf(__x); }
@@ -473,6 +480,7 @@ namespace tr1
   inline long double
   cbrt(long double __x)
   { return __builtin_cbrtl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -482,6 +490,7 @@ namespace tr1
 
   using std::ceil;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   copysign(float __x, float __y)
   { return __builtin_copysignf(__x, __y); }
@@ -489,6 +498,7 @@ namespace tr1
   inline long double
   copysign(long double __x, long double __y)
   { return __builtin_copysignl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -501,6 +511,7 @@ namespace tr1
   using std::cos;
   using std::cosh;  
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   erf(float __x)
   { return __builtin_erff(__x); }
@@ -508,6 +519,7 @@ namespace tr1
   inline long double
   erf(long double __x)
   { return __builtin_erfl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -515,6 +527,7 @@ namespace tr1
     erf(_Tp __x)
     { return __builtin_erf(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   erfc(float __x)
   { return __builtin_erfcf(__x); }
@@ -522,6 +535,7 @@ namespace tr1
   inline long double
   erfc(long double __x)
   { return __builtin_erfcl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -531,6 +545,7 @@ namespace tr1
 
   using std::exp;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   exp2(float __x)
   { return __builtin_exp2f(__x); }
@@ -538,6 +553,7 @@ namespace tr1
   inline long double
   exp2(long double __x)
   { return __builtin_exp2l(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -545,6 +561,7 @@ namespace tr1
     exp2(_Tp __x)
     { return __builtin_exp2(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   expm1(float __x)
   { return __builtin_expm1f(__x); }
@@ -552,6 +569,7 @@ namespace tr1
   inline long double
   expm1(long double __x)
   { return __builtin_expm1l(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -568,6 +586,7 @@ namespace tr1
   using ::fabs;
 
 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   fabs(float __x)
   { return __builtin_fabsf(__x); }
@@ -575,6 +594,7 @@ namespace tr1
   inline long double
   fabs(long double __x)
   { return __builtin_fabsl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -583,6 +603,7 @@ namespace tr1
     { return __builtin_fabs(__x); }
 #endif
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   fdim(float __x, float __y)
   { return __builtin_fdimf(__x, __y); }
@@ -590,6 +611,7 @@ namespace tr1
   inline long double
   fdim(long double __x, long double __y)
   { return __builtin_fdiml(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -601,6 +623,7 @@ namespace tr1
 
   using std::floor;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   fma(float __x, float __y, float __z)
   { return __builtin_fmaf(__x, __y, __z); }
@@ -608,6 +631,7 @@ namespace tr1
   inline long double
   fma(long double __x, long double __y, long double __z)
   { return __builtin_fmal(__x, __y, __z); }
+#endif
 
   template<typename _Tp, typename _Up, typename _Vp>
     inline typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
@@ -617,6 +641,7 @@ namespace tr1
       return fma(__type(__x), __type(__y), __type(__z));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   fmax(float __x, float __y)
   { return __builtin_fmaxf(__x, __y); }
@@ -624,6 +649,7 @@ namespace tr1
   inline long double
   fmax(long double __x, long double __y)
   { return __builtin_fmaxl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -633,6 +659,7 @@ namespace tr1
       return fmax(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   fmin(float __x, float __y)
   { return __builtin_fminf(__x, __y); }
@@ -640,6 +667,7 @@ namespace tr1
   inline long double
   fmin(long double __x, long double __y)
   { return __builtin_fminl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -652,6 +680,7 @@ namespace tr1
   using std::fmod;
   using std::frexp;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   hypot(float __x, float __y)
   { return __builtin_hypotf(__x, __y); }
@@ -659,6 +688,7 @@ namespace tr1
   inline long double
   hypot(long double __x, long double __y)
   { return __builtin_hypotl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -668,6 +698,7 @@ namespace tr1
       return hypot(__type(__y), __type(__x));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline int
   ilogb(float __x)
   { return __builtin_ilogbf(__x); }
@@ -675,6 +706,7 @@ namespace tr1
   inline int
   ilogb(long double __x)
   { return __builtin_ilogbl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -684,6 +716,7 @@ namespace tr1
 
   using std::ldexp;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   lgamma(float __x)
   { return __builtin_lgammaf(__x); }
@@ -691,6 +724,7 @@ namespace tr1
   inline long double
   lgamma(long double __x)
   { return __builtin_lgammal(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -698,6 +732,7 @@ namespace tr1
     lgamma(_Tp __x)
     { return __builtin_lgamma(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline long long
   llrint(float __x)
   { return __builtin_llrintf(__x); }
@@ -705,6 +740,7 @@ namespace tr1
   inline long long
   llrint(long double __x)
   { return __builtin_llrintl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -712,6 +748,7 @@ namespace tr1
     llrint(_Tp __x)
     { return __builtin_llrint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline long long
   llround(float __x)
   { return __builtin_llroundf(__x); }
@@ -719,6 +756,7 @@ namespace tr1
   inline long long
   llround(long double __x)
   { return __builtin_llroundl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -729,6 +767,7 @@ namespace tr1
   using std::log;
   using std::log10;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   log1p(float __x)
   { return __builtin_log1pf(__x); }
@@ -736,6 +775,7 @@ namespace tr1
   inline long double
   log1p(long double __x)
   { return __builtin_log1pl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -744,6 +784,7 @@ namespace tr1
     { return __builtin_log1p(__x); }
 
   // DR 568.
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   log2(float __x)
   { return __builtin_log2f(__x); }
@@ -751,6 +792,7 @@ namespace tr1
   inline long double
   log2(long double __x)
   { return __builtin_log2l(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -758,6 +800,7 @@ namespace tr1
     log2(_Tp __x)
     { return __builtin_log2(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   logb(float __x)
   { return __builtin_logbf(__x); }
@@ -765,6 +808,7 @@ namespace tr1
   inline long double
   logb(long double __x)
   { return __builtin_logbl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -774,6 +818,7 @@ namespace tr1
       return __builtin_logb(__x);
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline long
   lrint(float __x)
   { return __builtin_lrintf(__x); }
@@ -781,6 +826,7 @@ namespace tr1
   inline long
   lrint(long double __x)
   { return __builtin_lrintl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -788,6 +834,7 @@ namespace tr1
     lrint(_Tp __x)
     { return __builtin_lrint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline long
   lround(float __x)
   { return __builtin_lroundf(__x); }
@@ -795,6 +842,7 @@ namespace tr1
   inline long
   lround(long double __x)
   { return __builtin_lroundl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -802,6 +850,7 @@ namespace tr1
     lround(_Tp __x)
     { return __builtin_lround(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   nearbyint(float __x)
   { return __builtin_nearbyintf(__x); }
@@ -809,6 +858,7 @@ namespace tr1
   inline long double
   nearbyint(long double __x)
   { return __builtin_nearbyintl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -816,6 +866,7 @@ namespace tr1
     nearbyint(_Tp __x)
     { return __builtin_nearbyint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   nextafter(float __x, float __y)
   { return __builtin_nextafterf(__x, __y); }
@@ -823,6 +874,7 @@ namespace tr1
   inline long double
   nextafter(long double __x, long double __y)
   { return __builtin_nextafterl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -832,6 +884,7 @@ namespace tr1
       return nextafter(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   nexttoward(float __x, long double __y)
   { return __builtin_nexttowardf(__x, __y); }
@@ -839,6 +892,7 @@ namespace tr1
   inline long double
   nexttoward(long double __x, long double __y)
   { return __builtin_nexttowardl(__x, __y); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -846,6 +900,7 @@ namespace tr1
     nexttoward(_Tp __x, long double __y)
     { return __builtin_nexttoward(__x, __y); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   remainder(float __x, float __y)
   { return __builtin_remainderf(__x, __y); }
@@ -853,6 +908,7 @@ namespace tr1
   inline long double
   remainder(long double __x, long double __y)
   { return __builtin_remainderl(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -862,6 +918,7 @@ namespace tr1
       return remainder(__type(__x), __type(__y));
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   remquo(float __x, float __y, int* __pquo)
   { return __builtin_remquof(__x, __y, __pquo); }
@@ -869,6 +926,7 @@ namespace tr1
   inline long double
   remquo(long double __x, long double __y, int* __pquo)
   { return __builtin_remquol(__x, __y, __pquo); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
@@ -878,6 +936,7 @@ namespace tr1
       return remquo(__type(__x), __type(__y), __pquo);
     }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   rint(float __x)
   { return __builtin_rintf(__x); }
@@ -885,6 +944,7 @@ namespace tr1
   inline long double
   rint(long double __x)
   { return __builtin_rintl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -892,6 +952,7 @@ namespace tr1
     rint(_Tp __x)
     { return __builtin_rint(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   round(float __x)
   { return __builtin_roundf(__x); }
@@ -899,6 +960,7 @@ namespace tr1
   inline long double
   round(long double __x)
   { return __builtin_roundl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -906,6 +968,7 @@ namespace tr1
     round(_Tp __x)
     { return __builtin_round(__x); }
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   scalbln(float __x, long __ex)
   { return __builtin_scalblnf(__x, __ex); }
@@ -913,6 +976,7 @@ namespace tr1
   inline long double
   scalbln(long double __x, long __ex)
   { return __builtin_scalblnl(__x, __ex); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -920,6 +984,7 @@ namespace tr1
     scalbln(_Tp __x, long __ex)
     { return __builtin_scalbln(__x, __ex); }
  
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   scalbn(float __x, int __ex)
   { return __builtin_scalbnf(__x, __ex); }
@@ -927,6 +992,7 @@ namespace tr1
   inline long double
   scalbn(long double __x, int __ex)
   { return __builtin_scalbnl(__x, __ex); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -940,6 +1006,7 @@ namespace tr1
   using std::tan;
   using std::tanh;
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   tgamma(float __x)
   { return __builtin_tgammaf(__x); }
@@ -947,6 +1014,7 @@ namespace tr1
   inline long double
   tgamma(long double __x)
   { return __builtin_tgammal(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -954,6 +1022,7 @@ namespace tr1
     tgamma(_Tp __x)
     { return __builtin_tgamma(__x); }
  
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   trunc(float __x)
   { return __builtin_truncf(__x); }
@@ -961,6 +1030,7 @@ namespace tr1
   inline long double
   trunc(long double __x)
   { return __builtin_truncl(__x); }
+#endif
 
   template<typename _Tp>
     inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 
@@ -994,6 +1064,7 @@ namespace tr1
   // the discussion about this issue here:
   // http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01278.html
 
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO
   inline float
   pow(float __x, float __y)
   { return std::pow(__x, __y); }
@@ -1001,6 +1072,7 @@ namespace tr1
   inline long double
   pow(long double __x, long double __y)
   { return std::pow(__x, __y); }
+#endif
 
   template<typename _Tp, typename _Up>
     inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
@@ -20,7 +20,7 @@
 // { dg-do compile }
 // { dg-add-options no_pch }
 
-// { dg-xfail-if "" { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.1[0-9]* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } { "*" } { "" } }
+// { dg-xfail-if "" { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.10* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } { "*" } { "" } }
 // { dg-excess-errors "" { target { { *-*-linux* *-*-gnu* *-*-darwin* *-*-solaris2.1[0-9]* hppa*-*-hpux* *-*-mingw* } || { uclibc || newlib } } } }
 
 #include <math.h>
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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