aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-10-01 10:43:43 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-10-02 11:29:11 +0100
commit05b7ab86e7d70e6f71a3012b08f5704b056a69fe (patch)
treeebc852b0d9acce5719601ad36346595eed96daf9
parent79ea0aab75732c26c38d4b64f1d97acedf80155a (diff)
downloadgcc-05b7ab86e7d70e6f71a3012b08f5704b056a69fe.zip
gcc-05b7ab86e7d70e6f71a3012b08f5704b056a69fe.tar.gz
gcc-05b7ab86e7d70e6f71a3012b08f5704b056a69fe.tar.bz2
libstdc++: Fix -Wlong-long warning in <bits/postypes.h>
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.
-rw-r--r--libstdc++-v3/include/bits/postypes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/postypes.h b/libstdc++-v3/include/bits/postypes.h
index 7bd973e..cf5f301 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<char>, and char_traits<wchar_t>.
*
@@ -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