Fix preprocessor checks for Clang builtins
authorJonathan Wakely <jwakely@redhat.com>
Tue, 2 Jul 2019 11:50:27 +0000 (12:50 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 2 Jul 2019 11:50:27 +0000 (12:50 +0100)
commit4887c9e80839eee3628490003abab18b17492401
tree9e81b71ff21870788ad227c9b6432113e683ef8a
parentfe51b129500370ad5818e6dc7a2439f53796f59e
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.

* 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: r272931
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config