@@ -39,6 +39,9 @@
#include <initializer_list>
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -962,6 +965,8 @@ _GLIBCXX_END_NAMESPACE_ALGO
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#ifdef _GLIBCXX_PARALLEL
# include <parallel/algorithmfwd.h>
#endif
@@ -49,6 +49,9 @@
#include <type_traits>
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -292,4 +295,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -41,6 +41,9 @@
#include <bits/c++config.h>
#include <bits/locale_classes.h> // locale::facet
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -840,4 +843,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif // _CODECVT_H
@@ -34,6 +34,9 @@
#include <bits/c++config.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvariadic-macros"
+
// All places in libstdc++-v3 where these are used, or /might/ be used, or
// don't need to be used, or perhaps /should/ be used, are commented with
// "concept requirements" (and maybe some more text). So grep like crazy
@@ -78,4 +81,5 @@
#endif // enable/disable
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_CONCEPT_CHECK
@@ -40,6 +40,9 @@
# include <type_traits> // is_same_v, is_integral_v
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+
//
// This file provides some compile-time information about various types.
// These representations were designed, on purpose, to be constant-expressions
@@ -582,4 +585,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
} // namespace
} // extern "C++"
+#pragma GCC diagnostic pop
+
#endif //_CPP_TYPE_TRAITS_H
@@ -40,6 +40,9 @@
# include <bits/node_handle.h>
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -2758,4 +2761,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#endif // _HASHTABLE_H
@@ -37,6 +37,9 @@
#include <bits/ptr_traits.h> // to_address
#include <bits/ranges_cmp.h> // identity, ranges::less
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1044,5 +1047,6 @@ namespace ranges
#endif // C++20 library concepts
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif // C++20
#endif // _ITERATOR_CONCEPTS_H
@@ -36,6 +36,9 @@
#include <bits/cxxabi_forced.h>
#include <bits/exception_defines.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -131,4 +134,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif /* _OSTREAM_INSERT_H */
@@ -39,6 +39,9 @@
#include <bits/max_size_type.h>
#include <bits/version.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+
#ifdef __cpp_lib_concepts
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -1073,5 +1076,6 @@ namespace ranges
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // library concepts
+#pragma GCC diagnostic pop
#endif // C++20
#endif // _GLIBCXX_RANGES_BASE_H
@@ -33,6 +33,9 @@
#define _GLIBCXX_REGEX_STATE_LIMIT 100000
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // anon struct
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -397,4 +400,6 @@ namespace __detail
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#include <bits/regex_automaton.tcc>
@@ -43,6 +43,9 @@
#undef abs
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+
extern "C++"
{
namespace std _GLIBCXX_VISIBILITY(default)
@@ -151,4 +154,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
} // namespace
} // extern "C++"
+#pragma GCC diagnostic pop
+
#endif // _GLIBCXX_BITS_STD_ABS_H
@@ -72,6 +72,9 @@
# endif
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // inline namespace
+
// See concept_check.h for the __glibcxx_*_requires macros.
namespace std _GLIBCXX_VISIBILITY(default)
@@ -5901,4 +5904,6 @@ _GLIBCXX_END_NAMESPACE_ALGO
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#endif /* _STL_ALGO_H */
@@ -31,11 +31,16 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#if _GLIBCXX_HAVE_FENV_H
# include_next <fenv.h>
#endif
+#pragma GCC diagnostic pop
+
#if __cplusplus >= 201103L
#if _GLIBCXX_USE_C99_FENV
@@ -31,6 +31,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#if __cplusplus >= 201103L
@@ -88,4 +91,6 @@ namespace std
#endif // C++11
+#pragma GCC diagnostic pop
+
#endif // _GLIBCXX_INTTYPES_H
@@ -31,6 +31,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#if __cplusplus >= 201103L
@@ -107,4 +110,6 @@ namespace std
#endif // C++11
+#pragma GCC diagnostic pop
+
#endif // _GLIBCXX_STDINT_H
@@ -37,6 +37,9 @@
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -312,4 +315,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+#pragma GCC diagnostic pop
+
#endif
@@ -34,6 +34,9 @@
#include <bits/c++config.h>
#include <bits/cpp_type_traits.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+
extern "C++" {
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
@@ -270,4 +273,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
} // namespace
} // extern "C++"
+#pragma GCC diagnostic pop
+
#endif
@@ -35,4 +35,4 @@ int main()
}
// { dg-error "required from" "" { target *-*-* } 28 }
-// { dg-error "no type" "" { target *-*-* } 71 }
+// { dg-error "no type" "" { target *-*-* } 74 }
@@ -36,5 +36,5 @@ int main()
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
-// { dg-error "declaration of" "" { target *-*-* } 100 }
// { dg-error "declaration of" "" { target *-*-* } 103 }
+// { dg-error "declaration of" "" { target *-*-* } 106 }
@@ -35,4 +35,4 @@ int main()
}
// { dg-error "required from" "" { target *-*-* } 28 }
-// { dg-error "no type" "" { target *-*-* } 114 }
+// { dg-error "no type" "" { target *-*-* } 117 }
@@ -36,5 +36,5 @@ int main()
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
-// { dg-error "declaration of" "" { target *-*-* } 143 }
// { dg-error "declaration of" "" { target *-*-* } 146 }
+// { dg-error "declaration of" "" { target *-*-* } 149 }
@@ -707,7 +707,7 @@ AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
AC_SUBST(OPTIMIZE_CXXFLAGS)
- WARN_FLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2"
+ WARN_FLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=19 -Wsystem-headers"
AC_SUBST(WARN_FLAGS)
])
@@ -32,6 +32,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -181,4 +184,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -41,6 +41,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
#include <bits/cxxabi_forced.h>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -1031,4 +1034,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -36,6 +36,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
#include <bits/cxxabi_forced.h>
#include <bits/move.h> // for swap
#include <cerrno>
@@ -1094,4 +1097,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -36,6 +36,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
#include <bits/cxxabi_forced.h>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -1166,4 +1169,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -36,6 +36,10 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+#pragma GCC diagnostic ignored "-Wvariadic-macros"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -380,4 +384,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -32,6 +32,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1433,4 +1436,5 @@ _GLIBCXX_END_NAMESPACE_LDBL
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+#pragma GCC diagnostic pop
#endif
@@ -36,6 +36,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
#include <bits/cxxabi_forced.h>
namespace std _GLIBCXX_VISIBILITY(default)
@@ -390,4 +393,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -55,6 +55,9 @@
// All dummy nodes will be eliminated at the end of compilation.
*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++20-extensions" // variadic macro with 0 args
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -621,4 +624,6 @@ namespace __detail
} // namespace __detail
_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace
+} // namespace std
+
+#pragma GCC diagnostic pop
@@ -36,6 +36,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -304,4 +307,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -36,6 +36,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -166,4 +169,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
#endif
@@ -55720,7 +55720,7 @@ $as_echo "$gxx_include_dir" >&6; }
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
- WARN_FLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2"
+ WARN_FLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=19 -Wsystem-headers"
@@ -32,6 +32,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvariadic-macros"
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+#pragma GCC diagnostic ignored "-Wc++23-extensions" // bf16
+
// The major release number for the GCC release the C++ library belongs to.
#define _GLIBCXX_RELEASE
@@ -910,4 +915,6 @@ namespace __gnu_cxx
#endif // __has_include
#endif // C++17
+#pragma GCC diagnostic pop
+
// End of prewritten config; the settings discovered at configure time follow.
@@ -30,5 +30,10 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#include_next <assert.h>
+
+#pragma GCC diagnostic pop
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <ctype.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -40,9 +40,14 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#include_next <errno.h>
+#pragma GCC diagnostic pop
+
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
#ifndef errno
#define errno errno
@@ -31,7 +31,12 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#include_next <float.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,7 +31,12 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#include_next <limits.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <locale.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -33,8 +33,13 @@
#include <bits/c++config.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <math.h>
+#pragma GCC diagnostic pop
+
// Get rid of those macros defined in <math.h> in lieu of real functions.
#undef abs
#undef div
@@ -31,8 +31,13 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <setjmp.h>
+#pragma GCC diagnostic pop
+
// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
#undef longjmp
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <signal.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,7 +31,12 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#undef __need___va_list
#include_next <stdarg.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,10 +31,15 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#define __need_size_t
#define __need_ptrdiff_t
#define __need_NULL
#define __need_offsetof
#include_next <stddef.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,8 +31,13 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <stdio.h>
+#pragma GCC diagnostic pop
+
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
#undef clearerr
#undef fclose
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <stdlib.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <string.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -31,6 +31,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include_next <time.h>
+#pragma GCC diagnostic pop
+
#endif
@@ -35,10 +35,15 @@
#include <cstddef>
#include <ctime>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#if _GLIBCXX_HAVE_WCHAR_H
#include_next <wchar.h>
#endif
+#pragma GCC diagnostic pop
+
// Need to do a bit of trickery here with mbstate_t as char_traits
// assumes it is in wchar.h, regardless of wchar_t specializations.
#ifndef _GLIBCXX_HAVE_MBSTATE_T
@@ -31,10 +31,15 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
+
#include <bits/c++config.h>
#if _GLIBCXX_HAVE_WCTYPE_H
#include_next <wctype.h>
#endif
+#pragma GCC diagnostic pop
+
#endif
@@ -44,6 +44,9 @@
#ifndef _GLIBCXX_CLIMITS
#define _GLIBCXX_CLIMITS 1
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+
#ifndef LLONG_MIN
#define LLONG_MIN (-__LONG_LONG_MAX__ - 1)
#endif
@@ -56,4 +59,6 @@
#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
#endif
+#pragma GCC diagnostic pop
+
#endif
@@ -43,9 +43,14 @@
#include <bits/c++config.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <math.h>
#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+#pragma GCC diagnostic pop
+
#include <bits/std_abs.h>
#ifndef _GLIBCXX_CMATH
@@ -52,6 +52,9 @@
#define __glibcxx_want_byte
#include <bits/version.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+
extern "C++"
{
#if __cplusplus >= 201103L
@@ -189,4 +192,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif // __cpp_lib_byte
} // extern "C++"
+#pragma GCC diagnostic pop
+
#endif // _GLIBCXX_CSTDDEF
@@ -75,9 +75,13 @@ namespace std
// Need to ensure this finds the C library's <stdlib.h> not a libstdc++
// wrapper that might already be installed later in the include search path.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // include_next
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <stdlib.h>
#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+#pragma GCC diagnostic pop
+
#include <bits/std_abs.h>
// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
@@ -33,6 +33,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // DF suffix
+
#include <bits/c++config.h>
#ifndef _GLIBCXX_USE_DECIMAL_FLOAT
@@ -491,4 +494,5 @@ _GLIBCXX_END_NAMESPACE_VERSION
#include <decimal/decimal.h>
+#pragma GCC diagnostic pop
#endif /* _GLIBCXX_DECIMAL */
@@ -66,6 +66,10 @@
#include <ext/memory> // For uninitialized_copy_n
+// Ignore warnings about default member initializers.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -3009,6 +3013,8 @@ namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
# include <ext/ropeimpl.h>
#endif
@@ -42,6 +42,9 @@
#include <type_traits>
#include <bits/utility.h> // in_place_type_t
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // aligned_storage
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -661,5 +664,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#endif // __cpp_lib_any
#endif // _GLIBCXX_ANY
@@ -31,6 +31,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+
#include <bits/requires_hosted.h> // for error codes
// As an extension we support <charconv> in C++14, but this header should not
@@ -932,4 +935,5 @@ namespace __detail
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++14
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_CHARCONV
@@ -38,6 +38,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
+
#include <bits/c++config.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
@@ -2650,4 +2653,5 @@ _GLIBCXX_END_NAMESPACE_VERSION
#pragma clang diagnostic pop
#endif
+#pragma GCC diagnostic pop
#endif /* _GLIBCXX_COMPLEX */
@@ -31,6 +31,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++17-extensions"
+
#define __glibcxx_want_coroutine
#include <bits/version.h>
@@ -358,4 +361,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // __cpp_lib_coroutine
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_COROUTINE
@@ -63,6 +63,10 @@
# include <cctype>
#endif
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+#pragma GCC diagnostic ignored "-Wc++23-extensions" // bf16
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1674,6 +1678,10 @@ namespace __format
do
{
+ // Mangling of this lambda, and thus resize_and_overwrite
+ // instantiated with it, was fixed in ABI 18 (G++ 13). Since
+ // <format> was new in G++ 13, and is experimental, that
+ // isn't a problem.
auto __overwrite = [&__to_chars, &__res] (char* __p, size_t __n)
{
__res = __to_chars(__p + 1, __p + __n - 1);
@@ -4734,4 +4742,5 @@ namespace __format
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // __cpp_lib_format
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_FORMAT
@@ -35,6 +35,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
#include <bits/requires_hosted.h> // iostreams
#include <bits/c++config.h>
@@ -543,4 +546,5 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+#pragma GCC diagnostic pop
#endif /* _GLIBCXX_IOMANIP */
@@ -39,6 +39,11 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // Q suffix
+#pragma GCC diagnostic ignored "-Wlong-long"
+#pragma GCC diagnostic ignored "-Wc++23-extensions"
+
#include <bits/c++config.h>
//
@@ -2229,4 +2234,5 @@ _GLIBCXX_END_NAMESPACE_VERSION
#undef __glibcxx_digits10
#undef __glibcxx_max_digits10
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_NUMERIC_LIMITS
@@ -38,6 +38,9 @@
#include <type_traits>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // Q extension
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -232,5 +235,7 @@ __glibcxx_numbers (__float128, Q);
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#pragma GCC diagnostic pop
+
#endif // __cpp_lib_math_constants
#endif // _GLIBCXX_NUMBERS
@@ -44,6 +44,10 @@
#include <ext/type_traits.h>
#include <bits/move.h> // for std::__addressof
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvolatile" // volatile parm/return
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -2282,4 +2286,5 @@ namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION
}
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_TR1_FUNCTIONAL
@@ -34,6 +34,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
#include <bits/requires_hosted.h> // TR1
#include <utility>
@@ -425,4 +428,5 @@ namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION
}
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_TR1_TUPLE
@@ -31,6 +31,9 @@
#pragma GCC system_header
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+
#include <bits/requires_hosted.h> // TR1
#include <bits/c++config.h>
@@ -684,4 +687,5 @@ namespace tr1
_GLIBCXX_END_NAMESPACE_VERSION
}
+#pragma GCC diagnostic pop
#endif // _GLIBCXX_TR1_TYPE_TRAITS
@@ -39,6 +39,10 @@
#include <concepts>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic" // __int128
+#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
// [cmp.categories], comparison category types
@@ -1258,6 +1262,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
#endif // __cpp_lib_three_way_comparison >= 201907L
} // namespace std
+#pragma GCC diagnostic pop
+
#endif // C++20
#endif // _COMPARE
@@ -46,6 +46,9 @@
#define __glibcxx_want_constexpr_new
#include <bits/version.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions" // scoped enum
+
#pragma GCC visibility push(default)
extern "C++" {
@@ -245,5 +248,6 @@ namespace std
#endif // C++20
#pragma GCC visibility pop
+#pragma GCC diagnostic pop
#endif