This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14172] g++ should not emit effc++ warnings in system headers
- From: "gdr at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2005 09:08:27 -0000
- Subject: [Bug c++/14172] g++ should not emit effc++ warnings in system headers
- References: <bug-14172-6883@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from gdr at gcc dot gnu dot org 2005-11-26 09:08 -------
(In reply to comment #0)
> Some warning options trigger warnings in standard C++ headers, rendering
> -Werror
> unusable. This can be seen with a simple example:
>
> #include <list>
> int main()
> {
> std::list<int> foo;
> }
>
>
> When compiling with g++ -Weffc++ -Werror foo.cpp a lot of warnings about STL
> classes are emitted.
> While the gcc manual already mentions that -Weffc++ could produce spurious
> warnings, the same problems occurs with -Winline (I can try to produce a
> minimal
> test case if required). I think the compiler should ignore warnings in these
> files, as the user cannot fix them.
>
The real problem, as I understand it, is that we used to forget to copy
the in_system_header marker from templates when doing instantiations.
I think Mark Mitchell fixed that behaviour recently.
At any case, mainline GCC (4.2.x) issues no warning with your testcase.
-- Gaby
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14172