[gcc r15-3808] libstdc++: guard c++config pragmas
Jason Merrill
jason@gcc.gnu.org
Mon Sep 23 15:01:52 GMT 2024
https://gcc.gnu.org/g:358db2e3ed4acf44282d1d9ebbc4a1a3b6e38d21
commit r15-3808-g358db2e3ed4acf44282d1d9ebbc4a1a3b6e38d21
Author: Jason Merrill <jason@redhat.com>
Date: Sat Sep 21 13:30:31 2024 -0400
libstdc++: guard c++config pragmas
c++config needs to be compilable as C, in which mode we complain about the
-Wc++ pragmas.
libstdc++-v3/ChangeLog:
* include/bits/c++config: Don't try to disable -Wc++??-extensions
when compiling as C.
Diff:
---
libstdc++-v3/include/bits/c++config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 66d03cfd0375..16c67b80e769 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -34,8 +34,10 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvariadic-macros"
+#if __cplusplus
#pragma GCC diagnostic ignored "-Wc++11-extensions"
#pragma GCC diagnostic ignored "-Wc++23-extensions" // bf16
+#endif
// The major release number for the GCC release the C++ library belongs to.
#define _GLIBCXX_RELEASE
More information about the Libstdc++-cvs
mailing list