diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-09-27 21:01:46 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-09-27 23:55:11 +0100 |
commit | 68854071236d3a1064b46a5b22546956d3be32cd (patch) | |
tree | a3fa20840731029fb678d9cef6d6c9761e9bd27b /libstdc++-v3/include/c_global | |
parent | 16491e137c47ad36f9d73f070978841f1e8ca95d (diff) | |
download | gcc-68854071236d3a1064b46a5b22546956d3be32cd.zip gcc-68854071236d3a1064b46a5b22546956d3be32cd.tar.gz gcc-68854071236d3a1064b46a5b22546956d3be32cd.tar.bz2 |
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.
Diffstat (limited to 'libstdc++-v3/include/c_global')
-rw-r--r-- | libstdc++-v3/include/c_global/cstdlib | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib index a5df4cd..590e17c 100644 --- a/libstdc++-v3/include/c_global/cstdlib +++ b/libstdc++-v3/include/c_global/cstdlib @@ -217,6 +217,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 @@ -224,6 +226,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 |