This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/12854


On Tue, May 18, 2004 at 05:13:00AM -0600, llewelly@xmission.com wrote:

> Benjamin Kosnik <bkoz@redhat.com> writes:
> 
> > >Why doesn't
> > >
> > >#pragma GCC system_header
> > >
> > >address this issue?
> > 
> > what do you mean? Why does -Weffc++ appear to ignore this pragma?
> 
> No - I meant the opposite. I'm sorry I was unclear. This:
> 
> // C
> #include <cassert>
  // ...

> // C++
> #include <algorithm>
  // ...

> int main()
>   {
>   }
> 
> generates no warnings when compiled with -Weffc++, using gcc 3.4 or
>     3.5 20040502 .
> 
> That is, ITSM the pragma already solved the issue. Or I am
> misunderstanding something.

Try declaring e.g. "std::map<int,std::string>::iterator i;" in main()

Instantiating the templates causes lots of errors from -Weffc++

i.e. you can include the definitions, but you can't use 'em!

jon

-- 
"Any view of the universe that is not strange is false."
	- Neil Gaiman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]