aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/complex
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-08-08 22:19:49 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-08-09 15:19:16 +0100
commit798b1f04762c84b7cf38c4af5aba1b52823864ba (patch)
treecfbc2a7cadcd0176556e94516583a6c643f16481 /libstdc++-v3/include/std/complex
parent5b46eacc4949ec62ee718b172cf8eb056ff27654 (diff)
downloadgcc-798b1f04762c84b7cf38c4af5aba1b52823864ba.zip
gcc-798b1f04762c84b7cf38c4af5aba1b52823864ba.tar.gz
gcc-798b1f04762c84b7cf38c4af5aba1b52823864ba.tar.bz2
libstdc++: Suppress clang -Wc99-extensions warnings in <complex>
This prevents Clang from warning about the use of the non-standard __complex__ keyword. libstdc++-v3/ChangeLog: * include/std/complex: Add diagnostic pragma for clang.
Diffstat (limited to 'libstdc++-v3/include/std/complex')
-rw-r--r--libstdc++-v3/include/std/complex9
1 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 0ba2167..a4abe9a 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -47,6 +47,11 @@
// Get rid of a macro possibly defined in <complex.h>
#undef complex
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc99-extensions"
+#endif
+
#if __cplusplus > 201703L
# define __cpp_lib_constexpr_complex 201711L
#endif
@@ -2642,4 +2647,8 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif // C++11
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#endif /* _GLIBCXX_COMPLEX */