public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-3104] libstdc++: Suppress clang -Wc99-extensions warnings in <complex>
@ 2023-08-09 14:21 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-08-09 14:21 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:798b1f04762c84b7cf38c4af5aba1b52823864ba
commit r14-3104-g798b1f04762c84b7cf38c4af5aba1b52823864ba
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Aug 8 22:19:49 2023 +0100
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.
Diff:
---
libstdc++-v3/include/std/complex | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 0ba2167bf022..a4abe9aa96a9 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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-09 14:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 14:21 [gcc r14-3104] libstdc++: Suppress clang -Wc99-extensions warnings in <complex> Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).