]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: guard c++config pragmas
authorJason Merrill <jason@redhat.com>
Sat, 21 Sep 2024 17:30:31 +0000 (13:30 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 23 Sep 2024 14:53:01 +0000 (10:53 -0400)
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.

libstdc++-v3/include/bits/c++config

index 66d03cfd037520fa4929fd57d7d4bf916282f2bd..16c67b80e7694265f1c139aeb8557c4fbd4888b7 100644 (file)
 
 #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