-Weffc++ and STL

Frederick W. Wheeler wheeler@cipr.no_spam.rpi.edu
Sun Oct 10 15:58:00 GMT 1999


Using pragmas to control the emmission of warnings has been discussed
in the egcs mailing list.  I believe that nobody with the knowhow to
implement this is interested in doing it.  One of the reasons is that
postprocessing options, like the grep I noted, are available.  Also,
the gcc people are very much against pragmas for some reason.

Fred Wheeler

"Andy Glew" <aglew@students.wisc.edu> writes:
> .> I use the -Weffc++ option and the following long grep command to
> > eliminate warnings from the STL headers.
> 
> Wow!
> 
> Thanks for sharing this grep with me.
> 
> Ummm.....  this strongly suggests to me
> that it might be worthwhile having pragmas
> to turn on and off various warnings around certain headers.
> 
> E.g.
> 
> 
> #pragma S := present_gcc_switch_state()
> #pragma set_gcc_switch_state( present_gcc_switch_state(), "-Wno-effc++" )
> #include <list>
> #pragma set_gcc_switch_state( S )
> 
> although I am aware of how GCC likes to play games with pragmas

-- 
Fred Wheeler
wheeler (at) cipr.rpi.edu
www.cipr.rpi.edu/wheeler


More information about the Gcc-help mailing list