[PATCH, committed] Fix PR libstdc++/64883

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH, committed] Fix PR libstdc++/64883

Iain Sandoe-5
Hi

I applied the following as discussed with Jonathan on the PR and IRC,
will back port to 8.x and 7.x in due course.

----

Some of Darwin's headers use always_inline so don't test that
   
  Because Darwin system headers use always_inline rather than
    __always_inline__ the libstdc++ test will fail, even if our headers only
    use the reserved form of the attribute. Don't test it on Darwin, and
    assume that testing on other targets will catch any accidental misuses
    in libstdc++ headers.
   
            PR libstdc++/64883
            * testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't test
            always_inline on Darwin.
            * testsuite/17_intro/headers/c++2011/all_attributes.cc: Likewise.
            * testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
            * testsuite/17_intro/headers/c++2017/all_attributes.cc: Likewise.
            * testsuite/17_intro/headers/c++2020/all_attributes.cc: Likewise.

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7e8df9db11d..74ef0b3ef06 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,13 @@
+2018-12-06  Jonathan Wakely  <[hidden email]>
+    Iain Sandoe  <[hidden email]>

+ PR libstdc++/64883
+ * testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't test
+ always_inline on Darwin.
+ * testsuite/17_intro/headers/c++2011/all_attributes.cc: Likewise.
+ * testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
+ * testsuite/17_intro/headers/c++2017/all_attributes.cc: Likewise.
+ * testsuite/17_intro/headers/c++2020/all_attributes.cc: Likewise.
+
  PR libstdc++/88084 - Implement LWG 2777
  * include/std/string_view (basic_string_view::copy): Use traits to
  copy.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
index b6ff8c47d43..0e7dcf736f2 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -21,9 +21,9 @@
 // Ensure the library only uses the __name__ form for attributes.
 // Don't test 'const' because it is reserved anyway.
 #define abi_tag 1
-#define always_inline 1
 #ifndef __APPLE__
 // darwin headers use these, see PR 64883
+# define always_inline 1
 # define deprecated 1
 # define noreturn 1
 # define visibility 1
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
index 33b759f7399..82f372d8294 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
@@ -21,11 +21,11 @@
 // Ensure the library only uses the __name__ form for attributes.
 // Don't test 'const' and 'noreturn' because they are reserved anyway.
 #define abi_tag 1
-#define always_inline 1
 #ifndef __APPLE__
 // darwin headers use these, see PR 64883
-# define visibility 1
+# define always_inline 1
 # define deprecated 1
+# define visibility 1
 #endif
 #define packed 1
 #define pure 1
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index dbea4feec55..d6cc2c9f9db 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -21,9 +21,9 @@
 // Ensure the library only uses the __name__ form for attributes.
 // Don't test 'const' and 'noreturn' because they are reserved anyway.
 #define abi_tag 1
-#define always_inline 1
 #ifndef __APPLE__
 // darwin headers use these, see PR 64883
+# define always_inline 1
 # define deprecated 1
 # define visibility 1
 #endif
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
index 0a92ae683a4..9f60190930d 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
@@ -21,9 +21,9 @@
 // Ensure the library only uses the __name__ form for attributes.
 // Don't test 'const' and 'noreturn' because they are reserved anyway.
 #define abi_tag 1
-#define always_inline 1
 #ifndef __APPLE__
 // darwin headers use this, see PR 64883
+# define always_inline 1
 # define visibility 1
 #endif
 #define packed 1
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
index 766c7b68617..a5fca4c5311 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
@@ -21,9 +21,9 @@
 // Ensure the library only uses the __name__ form for attributes.
 // Don't test 'const' and 'noreturn' because they are reserved anyway.
 #define abi_tag 1
-#define always_inline 1
 #ifndef __APPLE__
 // darwin headers use this, see PR 64883
+# define always_inline 1
 # define visibility 1
 #endif
 #define packed 1