On 02/19/2016 01:05 PM, Orion Poplawski wrote:
It appears that if gnulib detects the "signbit compiler built-ins" it insists
on using them.
It sounds like lib/math.in.h should be changed to not use the builtins
when compiling C++. Does the attached patch fix your problem, and if
not, can you suggest another patch? or can you suggest a better fix?
diff --git a/lib/math.in.h b/lib/math.in.h
index 736d532..afb080c 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -2205,7 +2205,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
#if @GNULIB_SIGNBIT@
-# if @REPLACE_SIGNBIT_USING_GCC@
+# if @REPLACE_SIGNBIT_USING_GCC@ && !defined __cplusplus
# undef signbit
/* GCC 4.0 and newer provides three built-ins for signbit. */
# define signbit(x) \