From: Jonathan Wakely Date: Fri, 26 Jul 2019 13:36:36 +0000 (+0100) Subject: Fix preprocessor checks for Clang builtins X-Git-Tag: releases/gcc-9.2.0~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02a1cdae588a16c5793b22cb5d34df0db3c855a5;p=thirdparty%2Fgcc.git 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 * 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1c6e5592bf45..d60df1790cdc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2019-07-26 Jonathan Wakely + + Backport from mainline + 2019-07-02 Jonathan Wakely + + * 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. + 2019-07-26 Jonathan Wakely Backport from mainline