------- Comment #9 from chris at bubblescope dot net  2010-04-20 18:53 -------
I don't think it's a front-end issue. '#pragma GCC system_header' is
specifically designed to stop warnings in headers. However, it stops 'good'
warnings as well as 'bad' warnings. 'system_header' could be extended to allow
(or disallow) specific warnings, but that seems like quite a major extension.

Romain: -Wsystem-headers will enable warnings in standard library types.
However note that you will get some warnings thrown up, which you won't be able
to work around.

The only real patch I can think of would be to avoid '#pragma GCC
system_header' being defined in C++03 mode, in <memory>. That would be a simple
patch like the below. The only problem is that this might left some other
warnings sneak back in. Something like (untested, sorry).


Index: memory
===================================================================
--- memory      (revision 158569)
+++ memory      (working copy)
@@ -44,7 +44,9 @@
 #ifndef _GLIBCXX_MEMORY
 #define _GLIBCXX_MEMORY 1

+#ifdef __GXX_EXPERIMENTAL_CXX0X__
 #pragma GCC system_header
+#endif

 /**
  * @defgroup memory Memory


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43820

Reply via email to