]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix preprocessor checks for Clang builtins
authorJonathan Wakely <redi@gcc.gnu.org>
Fri, 26 Jul 2019 13:36:36 +0000 (14:36 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 26 Jul 2019 13:36:36 +0000 (14:36 +0100)
commit02a1cdae588a16c5793b22cb5d34df0db3c855a5
tree8cabb880c2b4aef3967c456f6324a224d6ad0671
parent8852f119e4cd4812163c0ee1e9d19471a3b1145e
Fix preprocessor checks for Clang builtins

Clang seems to define built-ins that start with "__builtin_" as
non-keywords, which means that we need to use __has_builtin to detect
them, not __is_identifier. The built-ins that don't start with
"__builtin_" are keywords, and can only be detected using
__is_identifier and not by __has_builtin.

Backport from mainline
2019-07-02  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
instead of __is_identifier to detect Clang support.

From-SVN: r273832
libstdc++-v3/ChangeLog