------- 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

Reply via email to