From: Bruno Haible Date: Mon, 9 Feb 2026 16:53:38 +0000 (+0100) Subject: signbit: Fix compil. error in C++ mode on macOS 14 (regr. 2026-02-03). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8390bed10d7ef1b25db3db758907a5756da89ed2;p=thirdparty%2Fgnulib.git signbit: Fix compil. error in C++ mode on macOS 14 (regr. 2026-02-03). * lib/math.in.h (signbit): Don't define as a template if the compiler is clang. --- diff --git a/ChangeLog b/ChangeLog index 121ff927aa..9415ff0bf2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-02-09 Bruno Haible + + signbit: Fix compil. error in C++ mode on macOS 14 (regr. 2026-02-03). + * lib/math.in.h (signbit): Don't define as a template if the compiler + is clang. + 2026-02-09 Bruno Haible isnan: Fix compilation error in C++ mode on NetBSD (regr. 2026-02-03). diff --git a/lib/math.in.h b/lib/math.in.h index 4174445d38..14218ea08c 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2716,7 +2716,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit /* GCC >= 4.0 and clang provide three built-ins for signbit. */ -# ifdef __cplusplus +# if defined __cplusplus && !defined __clang__ template int signbit (T); template <> inline int signbit (float x) { return __builtin_signbitf (x); } template <> inline int signbit (double x) { return __builtin_signbit (x); } @@ -2770,7 +2770,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); }) # endif # endif -# ifdef __cplusplus +# if defined __cplusplus && !defined __clang__ template int signbit (T); template <> inline int signbit (float x) { return gl_signbitf (x); } template <> inline int signbit (double x) { return gl_signbitd (x); }