]> Savannah Git Hosting - gnulib.git/commitdiff
math: Fix compilation error in C++ mode on macOS 12.5.
authorBruno Haible <bruno@clisp.org>
Thu, 9 Feb 2023 18:27:37 +0000 (19:27 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 10 Feb 2023 03:26:40 +0000 (04:26 +0100)
* lib/math.in.h (isnan): On macOS, treat clang version 14 again like
clang versions < 12.

ChangeLog
lib/math.in.h

index 8126106a05e5911e2466c53dd4d115aeb6a1e43a..36feddfa7e9b209b1861876357672271b1372279 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-09  Bruno Haible  <bruno@clisp.org>
+
+       math: Fix compilation error in C++ mode on macOS 12.5.
+       * lib/math.in.h (isnan): On macOS, treat clang version 14 again like
+       clang versions < 12.
+
 2023-02-09  Bruno Haible  <bruno@clisp.org>
 
        Fix compilation errors in C++ mode on macOS 12.5.
index 0ef1ba10284099e8dfc2421842587e1a7ad2fa1b..3d9465828e845c0a5404d8b54a0e271716f0fdc3 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <math.h>.
 
-   Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2007-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
@@ -2617,7 +2617,7 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
 #  if defined isnan || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
 #   undef isnan
-#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
+#   if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ != 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
   /* This platform's <cmath> possibly defines isnan through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)