]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add parentheses around _GLIBCXX_HAS_BUILTIN definition
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 Feb 2025 14:45:16 +0000 (14:45 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 20 Feb 2025 11:34:32 +0000 (11:34 +0000)
This allows _GLIBCXX_HAS_BUILTIN (or _GLIBCXX_USE_BUILTIN_TRAIT) to be
used as part of a larger logical expression.

libstdc++-v3/ChangeLog:

* include/bits/c++config (_GLIBCXX_HAS_BUILTIN): Add parentheses.

libstdc++-v3/include/bits/c++config

index b0ca6579cfb8d7ff185615c828824d41a4d1a75a..07f75ea66595051733a0c22f84a089a524541d60 100644 (file)
@@ -885,7 +885,7 @@ namespace __gnu_cxx
 #ifdef __has_builtin
 # ifdef __is_identifier
 // Intel and older Clang require !__is_identifier for some built-ins:
-#  define _GLIBCXX_HAS_BUILTIN(B) __has_builtin(B) || ! __is_identifier(B)
+#  define _GLIBCXX_HAS_BUILTIN(B) (__has_builtin(B) || ! __is_identifier(B))
 # else
 #  define _GLIBCXX_HAS_BUILTIN(B) __has_builtin(B)
 # endif