]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Do not use #include inside push visibility scope [PR99871]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 6 Apr 2021 14:11:15 +0000 (15:11 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 6 May 2022 13:43:39 +0000 (14:43 +0100)
libstdc++-v3/ChangeLog:

PR libstdc++/99871
* include/bits/specfun.h: Use visibility attribute on namespace,
instead of pragma push/pop.
* libsupc++/compare: Likewise.
* libsupc++/exception: Likewise.
* libsupc++/exception.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/initializer_list: Likewise.
* libsupc++/nested_exception.h: Likewise.

libstdc++-v3/include/bits/specfun.h
libstdc++-v3/libsupc++/compare
libstdc++-v3/libsupc++/exception
libstdc++-v3/libsupc++/exception.h
libstdc++-v3/libsupc++/exception_ptr.h
libstdc++-v3/libsupc++/initializer_list
libstdc++-v3/libsupc++/nested_exception.h

index cac350217b879d5dd0accaf0ccc35f5099a57c8f..a12b04b3ea73990bb92cff6b51dd07646c829b8c 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef _GLIBCXX_BITS_SPECFUN_H
 #define _GLIBCXX_BITS_SPECFUN_H 1
 
-#pragma GCC visibility push(default)
-
 #include <bits/c++config.h>
 
 #define __STDCPP_MATH_SPEC_FUNCS__ 201003L
@@ -1385,6 +1383,4 @@ _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace __gnu_cxx
 #endif // __STRICT_ANSI__
 
-#pragma GCC visibility pop
-
 #endif // _GLIBCXX_BITS_SPECFUN_H
index e9cf9139deff6855e0b2c70e49f12b632855f27d..066867e9ce179c624406baa968318889ff6d6037 100644 (file)
 
 #if __cplusplus > 201703L && __cpp_impl_three_way_comparison >= 201907L
 
-#pragma GCC visibility push(default)
-
 #include <concepts>
 
 #if __cpp_lib_concepts
 # define __cpp_lib_three_way_comparison 201907L
 #endif
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   // [cmp.categories], comparison category types
 
@@ -1239,8 +1237,6 @@ namespace std
 #endif // concepts
 } // namespace std
 
-#pragma GCC visibility pop
-
 #endif // C++20
 
 #endif // _COMPARE
index ae2b0dd7f78d6d22b8dfc196b62b7578ccad9868..24c91292a1601d8fc9bc29a737219615a48ffec7 100644 (file)
 
 #pragma GCC system_header
 
-#pragma GCC visibility push(default)
-
 #include <bits/c++config.h>
 #include <bits/exception.h>
 
 extern "C++" {
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   /** @addtogroup exceptions
    *  @{
@@ -135,7 +133,7 @@ namespace std
   /// @} group exceptions
 } // namespace std
 
-namespace __gnu_cxx
+namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
@@ -162,8 +160,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 } // extern "C++"
 
-#pragma GCC visibility pop
-
 #if (__cplusplus >= 201103L)
 #include <bits/exception_ptr.h>
 #include <bits/nested_exception.h>
index 7d905184c64a4f2e47f10845ef9a6d0d2c5a3f99..1df02bddc1b8ca0c5481409a153f80525e3a17aa 100644 (file)
 
 #pragma GCC system_header
 
-#pragma GCC visibility push(default)
-
 #include <bits/c++config.h>
 
 extern "C++" {
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   /**
    * @defgroup exceptions Exceptions
@@ -82,6 +80,4 @@ namespace std
 
 }
 
-#pragma GCC visibility pop
-
 #endif
index 6433f059e9c4f73a5b093bb05485a8d97ded156b..21c53f686ba950f879486f5becf48ccfc7c15444 100644 (file)
@@ -31,8 +31,6 @@
 #ifndef _EXCEPTION_PTR_H
 #define _EXCEPTION_PTR_H
 
-#pragma GCC visibility push(default)
-
 #include <bits/c++config.h>
 #include <bits/exception_defines.h>
 #include <bits/cxxabi_init_exception.h>
@@ -51,7 +49,7 @@
 
 extern "C++" {
 
-namespace std 
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   class type_info;
 
@@ -283,6 +281,4 @@ namespace std
 
 } // extern "C++"
 
-#pragma GCC visibility pop
-
 #endif
index 79d32b219b47f491703910ce2777ca9ccdb5590b..efa1f164cde4829500678a8b88f8fa6cf0d34050 100644 (file)
 # include <bits/c++0x_warning.h>
 #else // C++0x
 
-#pragma GCC visibility push(default)
-
 #include <bits/c++config.h>
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   /// initializer_list
   template<class _E>
@@ -102,8 +100,6 @@ namespace std
     { return __ils.end(); }
 }
 
-#pragma GCC visibility pop
-
 #endif // C++11
 
 #endif // _INITIALIZER_LIST
index 6f0d5399708ef2e69cd88d9008fc7c89f1da1070..002a54e9fefd1013f54069b81e6a1cd249505af0 100644 (file)
 #ifndef _GLIBCXX_NESTED_EXCEPTION_H
 #define _GLIBCXX_NESTED_EXCEPTION_H 1
 
-#pragma GCC visibility push(default)
-
 #if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #else
 
-#include <bits/c++config.h>
 #include <bits/move.h>
 
 extern "C++" {
 
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
 {
   /**
    * @addtogroup exceptions
@@ -165,7 +162,4 @@ namespace std
 } // extern "C++"
 
 #endif // C++11
-
-#pragma GCC visibility pop
-
 #endif // _GLIBCXX_NESTED_EXCEPTION_H