[gcc/devel/omp/gcc-9] Fix preprocessor checks for Clang builtins

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 14:11:00 GMT 2020


https://gcc.gnu.org/g:02a1cdae588a16c5793b22cb5d34df0db3c855a5

commit 02a1cdae588a16c5793b22cb5d34df0db3c855a5
Author: Jonathan Wakely <redi@gcc.gnu.org>
Date:   Fri Jul 26 14:36:36 2019 +0100

    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

Diff:
---
 libstdc++-v3/ChangeLog | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1c6e559..d60df17 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,6 +1,15 @@
 2019-07-26  Jonathan Wakely  <jwakely@redhat.com>
 
 	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.
+
+2019-07-26  Jonathan Wakely  <jwakely@redhat.com>
+
+	Backport from mainline
 	2019-05-23  Jonathan Wakely  <jwakely@redhat.com>
 
 	* doc/xml/manual/status_cxx2017.xml: Add feature test macro for



More information about the Libstdc++-cvs mailing list