gcc/libstdc++-v3
Jason Merrill d3a7302ec5 libstdc++: add #pragma diagnostic
The use of #pragma GCC system_header in libstdc++ has led to bugs going
undetected for a while due to the silencing of compiler warnings that would
have revealed them promptly, and also interferes with warnings about
problematic template instantiations induced by user code.

But removing it, or even compiling with -Wsystem-header, is also problematic
due to warnings about deliberate uses of extensions.

So this patch adds #pragma GCC diagnostic as needed to suppress these
warnings.

The change to acinclude.m4 changes -Wabi to warn only in comparison to ABI
19, to avoid lots of warnings that we now mangle concept requirements, which
are in any case still experimental.  I checked for any other changes against
ABI v15, and found only the <format> lambda mangling, which we can ignore.

This also enables -Wsystem-headers while building the library, so we see any
warnings not silenced by these #pragmas.

libstdc++-v3/ChangeLog:

	* include/bits/algorithmfwd.h:
	* include/bits/allocator.h:
	* include/bits/codecvt.h:
	* include/bits/concept_check.h:
	* include/bits/cpp_type_traits.h:
	* include/bits/hashtable.h:
	* include/bits/iterator_concepts.h:
	* include/bits/ostream_insert.h:
	* include/bits/ranges_base.h:
	* include/bits/regex_automaton.h:
	* include/bits/std_abs.h:
	* include/bits/stl_algo.h:
	* include/c_compatibility/fenv.h:
	* include/c_compatibility/inttypes.h:
	* include/c_compatibility/stdint.h:
	* include/ext/concurrence.h:
	* include/ext/type_traits.h:
	* testsuite/ext/type_traits/add_unsigned_floating_neg.cc:
	* testsuite/ext/type_traits/add_unsigned_integer_neg.cc:
	* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc:
	* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc:
	* include/bits/basic_ios.tcc:
	* include/bits/basic_string.tcc:
	* include/bits/fstream.tcc:
	* include/bits/istream.tcc:
	* include/bits/locale_classes.tcc:
	* include/bits/locale_facets.tcc:
	* include/bits/ostream.tcc:
	* include/bits/regex_compiler.tcc:
	* include/bits/sstream.tcc:
	* include/bits/streambuf.tcc:
	* configure: Regenerate.
	* include/bits/c++config:
	* include/c/cassert:
	* include/c/cctype:
	* include/c/cerrno:
	* include/c/cfloat:
	* include/c/climits:
	* include/c/clocale:
	* include/c/cmath:
	* include/c/csetjmp:
	* include/c/csignal:
	* include/c/cstdarg:
	* include/c/cstddef:
	* include/c/cstdio:
	* include/c/cstdlib:
	* include/c/cstring:
	* include/c/ctime:
	* include/c/cwchar:
	* include/c/cwctype:
	* include/c_global/climits:
	* include/c_global/cmath:
	* include/c_global/cstddef:
	* include/c_global/cstdlib:
	* include/decimal/decimal:
	* include/ext/rope:
	* include/std/any:
	* include/std/charconv:
	* include/std/complex:
	* include/std/coroutine:
	* include/std/format:
	* include/std/iomanip:
	* include/std/limits:
	* include/std/numbers:
	* include/tr1/functional:
	* include/tr1/tuple:
	* include/tr1/type_traits:
	* libsupc++/compare:
	* libsupc++/new: Add #pragma GCC diagnostic to suppress
	undesired warnings.
	* acinclude.m4: Change -Wabi version from 2 to 19.

gcc/ChangeLog:

	* ginclude/stdint-wrap.h: Add #pragma GCC diagnostic to suppress
	undesired warnings.
	* gsyslimits.h: Likewise.
2024-09-19 10:23:16 -04:00
..
config libstdc++: Fix @file for target-specific opt_random.h 2024-08-28 21:34:21 +01:00
doc libstdc++: Update link to installation docs 2024-09-16 08:02:55 +07:00
include libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
libsupc++ libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
po
python libstdc++: Do not use std::vector<bool>::reference default ctor [PR115098] 2024-08-27 14:20:13 +01:00
scripts
src libstdc++: Only use std::ios_base_library_init() for ELF [PR116159] 2024-09-10 18:23:30 +01:00
testsuite libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
.editorconfig libstdc++: Add .editorconfig files 2024-09-16 10:10:23 +01:00
acinclude.m4 libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
aclocal.m4
ChangeLog Daily bump. 2024-09-19 00:18:55 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021
ChangeLog-2022
ChangeLog-2023
config.h.in libstdc++: Fix autoconf check for O_NONBLOCK in <fcntl.h> 2024-08-28 21:34:22 +01:00
configure libstdc++: add #pragma diagnostic 2024-09-19 10:23:16 -04:00
configure.ac libstdc++: Fix autoconf check for O_NONBLOCK in <fcntl.h> 2024-08-28 21:34:22 +01:00
configure.host
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.