]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix more pedwarns in headers for C++98
authorJonathan Wakely <jwakely@redhat.com>
Fri, 27 Sep 2024 20:01:46 +0000 (21:01 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 16 Jan 2025 09:47:09 +0000 (09:47 +0000)
Some tests e.g.  17_intro/headers/c++1998/all_pedantic_errors.cc FAIL
with GLIBCXX_TESTSUITE_STDS=98 due to numerous C++11 extensions still in
use in the library headers. The recent changes to not make them system
headers means we get warnings now.

This change adds more diagnostic pragmas to suppress those warnings.

libstdc++-v3/ChangeLog:

* include/bits/istream.tcc: Add diagnostic pragmas around uses
of long long and extern template.
* include/bits/locale_facets.h: Likewise.
* include/bits/locale_facets.tcc: Likewise.
* include/bits/locale_facets_nonio.tcc: Likewise.
* include/bits/ostream.tcc: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/c_global/cstdlib: Likewise.
* include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
Likewise.
* include/ext/pointer.h: Likewise.
* include/ext/stdio_sync_filebuf.h: Likewise.
* include/std/istream: Likewise.
* include/std/ostream: Likewise.
* include/tr1/cmath: Likewise.
* include/tr1/type_traits: Likewise.
* include/tr1/functional_hash.h: Likewise. Remove semi-colons
at namespace scope that aren't needed after macro expansion.
* include/tr1/tuple: Remove semi-colon at namespace scope.
* include/bits/vector.tcc: Change LL suffix to just L.

(cherry picked from commit 68854071236d3a1064b46a5b22546956d3be32cd)

17 files changed:
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/include/bits/locale_facets_nonio.tcc
libstdc++-v3/include/bits/ostream.tcc
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/include/c_global/cstdlib
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
libstdc++-v3/include/ext/pointer.h
libstdc++-v3/include/ext/stdio_sync_filebuf.h
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream
libstdc++-v3/include/tr1/cmath
libstdc++-v3/include/tr1/functional_hash.h
libstdc++-v3/include/tr1/tuple
libstdc++-v3/include/tr1/type_traits

index 16423bfbfcb1cdd2fe8362263e536816cec108cb..8afcc8baf31f3a34541bbfaca8f58a0c53f464f7 100644 (file)
@@ -392,7 +392,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
              __streambuf_type* __this_sb = this->rdbuf();
              int_type __c = __this_sb->sgetc();
              char_type __c2 = traits_type::to_char_type(__c);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
              unsigned long long __gcount = 0;
+#pragma GCC diagnostic pop
 
              while (!traits_type::eq_int_type(__c, __eof)
                     && !traits_type::eq_int_type(__c, __idelim)
@@ -1117,6 +1120,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // Inhibit implicit instantiations for required instantiations,
   // which are defined via explicit instantiations elsewhere.
 #if _GLIBCXX_EXTERN_TEMPLATE
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+#pragma GCC diagnostic ignored "-Wlong-long"
   extern template class basic_istream<char>;
   extern template istream& ws(istream&);
   extern template istream& operator>>(istream&, char&);
@@ -1129,8 +1135,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   extern template istream& istream::_M_extract(unsigned long&);
   extern template istream& istream::_M_extract(bool&);
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   extern template istream& istream::_M_extract(long long&);
   extern template istream& istream::_M_extract(unsigned long long&);
+#pragma GCC diagnostic pop
 #endif
   extern template istream& istream::_M_extract(float&);
   extern template istream& istream::_M_extract(double&);
@@ -1161,6 +1170,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   extern template class basic_iostream<wchar_t>;
 #endif
+#pragma GCC diagnostic pop
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 53bb108e3ead2a02dc5839e492d0cc920331d2a5..c15980b756027df7172ed7046d06ff2578c03fc3 100644 (file)
@@ -2061,6 +2061,8 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       { return this->do_get(__in, __end, __io, __err, __v); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       iter_type
       get(iter_type __in, iter_type __end, ios_base& __io,
          ios_base::iostate& __err, long long& __v) const
@@ -2070,6 +2072,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       get(iter_type __in, iter_type __end, ios_base& __io,
          ios_base::iostate& __err, unsigned long long& __v)  const
       { return this->do_get(__in, __end, __io, __err, __v); }
+#pragma GCC diagnostic pop
 #endif
       ///@}
 
@@ -2240,6 +2243,8 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       { return _M_extract_int(__beg, __end, __io, __err, __v); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       virtual iter_type
       do_get(iter_type __beg, iter_type __end, ios_base& __io,
             ios_base::iostate& __err, long long& __v) const
@@ -2249,6 +2254,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       do_get(iter_type __beg, iter_type __end, ios_base& __io,
             ios_base::iostate& __err, unsigned long long& __v) const
       { return _M_extract_int(__beg, __end, __io, __err, __v); }
+#pragma GCC diagnostic pop
 #endif
 
       virtual iter_type
@@ -2405,6 +2411,8 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       { return this->do_put(__s, __io, __fill, __v); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       iter_type
       put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const
       { return this->do_put(__s, __io, __fill, __v); }
@@ -2413,6 +2421,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       put(iter_type __s, ios_base& __io, char_type __fill,
          unsigned long long __v) const
       { return this->do_put(__s, __io, __fill, __v); }
+#pragma GCC diagnostic pop
 #endif
       ///@}
 
@@ -2544,6 +2553,8 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       { return _M_insert_int(__s, __io, __fill, __v); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       virtual iter_type
       do_put(iter_type __s, ios_base& __io, char_type __fill,
             long long __v) const
@@ -2553,6 +2564,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       do_put(iter_type __s, ios_base& __io, char_type __fill,
             unsigned long long __v) const
       { return _M_insert_int(__s, __io, __fill, __v); }
+#pragma GCC diagnostic pop
 #endif
 
       virtual iter_type
index cde81bffc08e37697c5b60ed10aa4c1ce1056131..0590e2ff454f1737bf245e7a36ad41206ac39eab 100644 (file)
@@ -758,9 +758,12 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
       const fmtflags __fmt = __io.flags();
       __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       typedef __gnu_cxx::__conditional_type<(sizeof(void*)
                                             <= sizeof(unsigned long)),
        unsigned long, unsigned long long>::__type _UIntPtrType;       
+#pragma GCC diagnostic pop
 
       _UIntPtrType __ul;
       __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
@@ -1202,9 +1205,12 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
                                         | ios_base::uppercase);
       __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase));
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       typedef __gnu_cxx::__conditional_type<(sizeof(const void*)
                                             <= sizeof(unsigned long)),
        unsigned long, unsigned long long>::__type _UIntPtrType;       
+#pragma GCC diagnostic pop
 
       __s = _M_insert_int(__s, __io, __fill,
                          reinterpret_cast<_UIntPtrType>(__v));
index 8f67be5a6147baf7d6b8646a384197c955b30090..fa250c1ae3d7a311de50235dd3aa81f23832305a 100644 (file)
@@ -1677,6 +1677,9 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
   // Inhibit implicit instantiations for required instantiations,
   // which are defined via explicit instantiations elsewhere.
 #if _GLIBCXX_EXTERN_TEMPLATE
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+#pragma GCC diagnostic ignored "-Wlong-long"
   extern template class moneypunct<char, false>;
   extern template class moneypunct<char, true>;
   extern template class moneypunct_byname<char, false>;
@@ -1890,6 +1893,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
     bool
     has_facet<messages<wchar_t> >(const locale&);
 #endif
+#pragma GCC diagnostic pop
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 972de79ea7008ac3f3c5ff14e5fcab2c1468904a..e21a78202f41e7012a2ac7541997d325db1e4840 100644 (file)
@@ -357,8 +357,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   extern template ostream& ostream::_M_insert(unsigned long);
   extern template ostream& ostream::_M_insert(bool);
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   extern template ostream& ostream::_M_insert(long long);
   extern template ostream& ostream::_M_insert(unsigned long long);
+#pragma GCC diagnostic pop
 #endif
   extern template ostream& ostream::_M_insert(double);
   extern template ostream& ostream::_M_insert(long double);
@@ -378,8 +381,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   extern template wostream& wostream::_M_insert(unsigned long);
   extern template wostream& wostream::_M_insert(bool);
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   extern template wostream& wostream::_M_insert(long long);
   extern template wostream& wostream::_M_insert(unsigned long long);
+#pragma GCC diagnostic pop
 #endif
   extern template wostream& wostream::_M_insert(double);
   extern template wostream& wostream::_M_insert(long double);
index 4cb52f3559f59dbf37b078bf2ca0f5425bfa4bd8..2931e0991443ad3be7096cd9e1a6472dfcfdaede 100644 (file)
@@ -1029,6 +1029,8 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
       std::__fill_a(__first, __last, __value);
     }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   // Used by fill_n, generate_n, etc. to convert _Size to an integral type:
   inline _GLIBCXX_CONSTEXPR int
   __size_to_integer(int __n) { return __n; }
@@ -1078,6 +1080,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
   __extension__ inline _GLIBCXX_CONSTEXPR long long
   __size_to_integer(__float128 __n) { return (long long)__n; }
 #endif
+#pragma GCC diagnostic pop
 
   template<typename _OutputIterator, typename _Size, typename _Tp>
     _GLIBCXX20_CONSTEXPR
@@ -1546,6 +1549,8 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
 #if __cplusplus >= 201402L
       return std::__bit_width(make_unsigned_t<_Tp>(__n)) - 1;
 #else
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       // Use +__n so it promotes to at least int.
       return (sizeof(+__n) * __CHAR_BIT__ - 1)
               - (sizeof(+__n) == sizeof(long long)
@@ -1553,6 +1558,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
                    : (sizeof(+__n) == sizeof(long)
                         ? __builtin_clzl(+__n)
                         : __builtin_clz(+__n)));
+#pragma GCC diagnostic pop
 #endif
     }
 
index 42352aa63cad4f6c8a041739b01253f0c816c559..1d16735782dc4aedd375e5c12e4c751e44e41e25 100644 (file)
@@ -1005,7 +1005,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
                const size_type __len =
                  _M_check_len(__n, "vector::_M_range_insert");
-#if __cplusplus < 201103LL
+#if __cplusplus < 201103L
                if (__len < (__n + (__old_start - __old_finish)))
                  __builtin_unreachable();
 #endif
index 69e7a39eb44e948a64def5c5a090f617c3f36b16..7bb11f5b788a110b2d8ad571d5c05eddfb580bf9 100644 (file)
@@ -211,6 +211,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
 
 #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   using ::llabs;
 
   inline lldiv_t
@@ -218,6 +220,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
 
   using ::lldiv;
+#pragma GCC diagnostic pop
 #endif
 
 #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
index 52c83296e62f222c04179457967abcec72303873..7146f89e1cf57998f481a5594d39928310632b56 100644 (file)
@@ -60,6 +60,8 @@ namespace detail
 #endif
     };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   // Originally taken from the SGI implementation; acknowledged in the docs.
   // Further modified (for 64 bits) from tr1's hashtable.
   static const std::size_t g_a_sizes[num_distinct_sizes] =
@@ -131,6 +133,7 @@ namespace detail
 #endif
 #endif
     };
+#pragma GCC diagnostic pop
 
 } // namespace detail
 
index 534b3c78226e716548f01ccaf0d1214e4675d704..f066ee9e8a8ce91ff7f77aea9133a6e21e43a05b 100644 (file)
@@ -436,8 +436,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       _CXX_POINTER_ARITH_OPERATOR_SET(long);
       _CXX_POINTER_ARITH_OPERATOR_SET(unsigned long);
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       _CXX_POINTER_ARITH_OPERATOR_SET(long long);
       _CXX_POINTER_ARITH_OPERATOR_SET(unsigned long long);
+#pragma GCC diagnostic pop
 #endif
 
       // Mathematical Manipulators
index f8993ad521abefdc6125a84c3983e1a5752f2473..263b040b317a862bf77e6754e83050b86934987a 100644 (file)
@@ -308,10 +308,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
 
 #if _GLIBCXX_EXTERN_TEMPLATE
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
   extern template class stdio_sync_filebuf<char>;
 #ifdef _GLIBCXX_USE_WCHAR_T
   extern template class stdio_sync_filebuf<wchar_t>;
 #endif
+#pragma GCC diagnostic pop
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 730e413c290b8ab4f8802d538407b3812255e705..dd2120b60c1dd66ba7201cb39ff955de56894712 100644 (file)
@@ -193,6 +193,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       { return _M_extract(__n); }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       __istream_type&
       operator>>(long long& __n)
       { return _M_extract(__n); }
@@ -200,6 +202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       __istream_type&
       operator>>(unsigned long long& __n)
       { return _M_extract(__n); }
+#pragma GCC diagnostic pop
 #endif
       ///@}
 
index cb5675fe1bdacd7fda90c0850a36fd63951b307c..a5417f9cb9872561a8e421f4ff72fa7876467b11 100644 (file)
@@ -205,6 +205,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
 #ifdef _GLIBCXX_USE_LONG_LONG
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
       __ostream_type&
       operator<<(long long __n)
       { return _M_insert(__n); }
@@ -212,6 +214,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       __ostream_type&
       operator<<(unsigned long long __n)
       { return _M_insert(__n); }
+#pragma GCC diagnostic pop
 #endif
       ///@}
 
index 83677a4e7168f1c43544dada95184e8e9ded27ce..dd4cb1e5b79149c7e8e47ab457c1ecb4f43f0b1c 100644 (file)
@@ -760,6 +760,9 @@ namespace tr1
     lgamma(_Tp __x)
     { return __builtin_lgamma(__x); }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+
 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
   inline long long
   llrint(float __x)
@@ -791,6 +794,7 @@ namespace tr1
                                           long long>::__type
     llround(_Tp __x)
     { return __builtin_llround(__x); }
+#pragma GCC diagnostic pop
 
 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
   inline float
index 57f0eb604ceb54ba40fff5e9f2f9008147aae17d..85d491f0e0a3968c68b959c0a655667fced3f24b 100644 (file)
@@ -69,19 +69,22 @@ namespace tr1
     hash<_Tp>::operator()(_Tp __val) const             \
     { return static_cast<size_t>(__val); }
 
-  _TR1_hashtable_define_trivial_hash(bool);
-  _TR1_hashtable_define_trivial_hash(char);
-  _TR1_hashtable_define_trivial_hash(signed char);
-  _TR1_hashtable_define_trivial_hash(unsigned char);
-  _TR1_hashtable_define_trivial_hash(wchar_t);
-  _TR1_hashtable_define_trivial_hash(short);
-  _TR1_hashtable_define_trivial_hash(int);
-  _TR1_hashtable_define_trivial_hash(long);
-  _TR1_hashtable_define_trivial_hash(long long);
-  _TR1_hashtable_define_trivial_hash(unsigned short);
-  _TR1_hashtable_define_trivial_hash(unsigned int);
-  _TR1_hashtable_define_trivial_hash(unsigned long);
-  _TR1_hashtable_define_trivial_hash(unsigned long long);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+  _TR1_hashtable_define_trivial_hash(bool)
+  _TR1_hashtable_define_trivial_hash(char)
+  _TR1_hashtable_define_trivial_hash(signed char)
+  _TR1_hashtable_define_trivial_hash(unsigned char)
+  _TR1_hashtable_define_trivial_hash(wchar_t)
+  _TR1_hashtable_define_trivial_hash(short)
+  _TR1_hashtable_define_trivial_hash(int)
+  _TR1_hashtable_define_trivial_hash(long)
+  _TR1_hashtable_define_trivial_hash(long long)
+  _TR1_hashtable_define_trivial_hash(unsigned short)
+  _TR1_hashtable_define_trivial_hash(unsigned int)
+  _TR1_hashtable_define_trivial_hash(unsigned long)
+  _TR1_hashtable_define_trivial_hash(unsigned long long)
+#pragma GCC diagnostic pop
 
 #undef _TR1_hashtable_define_trivial_hash
 
@@ -133,6 +136,8 @@ namespace tr1
         static size_t
         hash(const _Tp* __ptr, size_t __clength)
         {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
          size_t __result
            = static_cast<size_t>(14695981039346656037ULL);
          const char* __cptr = reinterpret_cast<const char*>(__ptr);
@@ -142,6 +147,7 @@ namespace tr1
              __result *= static_cast<size_t>(1099511628211ULL);
            }
          return __result;
+#pragma GCC diagnostic pop
        }
     };
 
index be26d283f8c2531e7fd8af07f15f2f4340d795b8..f74aecbe8cdf3b910d6fd146143c11ff57a86b67 100644 (file)
@@ -419,7 +419,7 @@ namespace tr1
   namespace
   {
     _Swallow_assign ignore;
-  }; // anonymous namespace
+  } // anonymous namespace
 }
 
 _GLIBCXX_END_NAMESPACE_VERSION
index f5714b0032cc8015840a90a002911da62bc9dd27..534d809d2f86b31df2544389b41c7a052c90002b 100644 (file)
@@ -118,8 +118,11 @@ namespace tr1
   _DEFINE_SPEC(0, __is_integral_helper, unsigned int, true)
   _DEFINE_SPEC(0, __is_integral_helper, long, true)
   _DEFINE_SPEC(0, __is_integral_helper, unsigned long, true)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   _DEFINE_SPEC(0, __is_integral_helper, long long, true)
   _DEFINE_SPEC(0, __is_integral_helper, unsigned long long, true)
+#pragma GCC diagnostic pop
 
   /// is_integral
   template<typename _Tp>
@@ -539,6 +542,8 @@ namespace tr1
     : public integral_constant<bool, is_pod<_Tp>::value>
     { };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
   template<typename>
     struct __is_signed_helper
     : public false_type { };
@@ -562,6 +567,7 @@ namespace tr1
   _DEFINE_SPEC(0, __is_unsigned_helper, unsigned int, true)
   _DEFINE_SPEC(0, __is_unsigned_helper, unsigned long, true)
   _DEFINE_SPEC(0, __is_unsigned_helper, unsigned long long, true)
+#pragma GCC diagnostic pop
 
   template<typename _Tp>
     struct is_unsigned