From: Jonathan Wakely Date: Tue, 1 Oct 2024 09:43:43 +0000 (+0100) Subject: libstdc++: Fix -Wlong-long warning in X-Git-Tag: basepoints/gcc-16~5539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05b7ab86e7d70e6f71a3012b08f5704b056a69fe;p=thirdparty%2Fgcc.git libstdc++: Fix -Wlong-long warning in For 32-bit targets __INT64_TYPE__ expands to long long, which gives a pedwarn for C++98 mode, causing: FAIL: 17_intro/headers/c++1998/all_pedantic_errors.cc -std=gnu++98 (test for excess errors) Excess errors: .../bits/postypes.h:64: error: ISO C++ 1998 does not support 'long long' [-Wlong-long] libstdc++-v3/ChangeLog: * include/bits/postypes.h: Fix -Wlong-long warning. --- diff --git a/libstdc++-v3/include/bits/postypes.h b/libstdc++-v3/include/bits/postypes.h index 7bd973e089b..cf5f30187fd 100644 --- a/libstdc++-v3/include/bits/postypes.h +++ b/libstdc++-v3/include/bits/postypes.h @@ -52,6 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // unspecified. The behaviour in this implementation is as noted // below. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wlong-long" /** * @brief Type used by fpos, char_traits, and char_traits. * @@ -65,6 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #else typedef long long streamoff; #endif +#pragma GCC diagnostic pop /// Integral type for I/O operation counts and buffer sizes. typedef ptrdiff_t streamsize; // Signed integral type