libstdc++: Fix more pedwarns in headers for C++98
commit68854071236d3a1064b46a5b22546956d3be32cd
authorJonathan Wakely <jwakely@redhat.com>
Fri, 27 Sep 2024 20:01:46 +0000 (27 21:01 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 27 Sep 2024 22:55:11 +0000 (27 23:55 +0100)
treea3fa20840731029fb678d9cef6d6c9761e9bd27b
parent16491e137c47ad36f9d73f070978841f1e8ca95d
libstdc++: Fix more pedwarns in headers for C++98

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.
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