Jamie Honan wrote:

> On Tue, May 24, 2005 at 10:41:27PM +1000, Erik de Castro Lopo wrote:
> > If -Wshadow catches on single bug its worth living with or 
> > rather working around any spurious warnings.
> > 
> > I wouldn't cut C code without it.
> 
> Erik, what are the warnings you regularly use?

For libsndfile the configure script chack to see if the compiler
is GCC and if it is turns on the following:

     -W -Wall -Wstrict-prototypes -Wmissing-prototypes
     -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs
     -Wshadow -Wbad-function-cast -Wwrite-strings

When I'm developing, I also add -Werror. 

In the near future, I will probably also add -Wswitch, -Wfloat-equal,
and -Winline.

> I naively assumed -Wall was everything worthwhile until
> Tridge showed his list of 'pedantics'.

Unfortunately what is included in -Wall changes over time and I can
never keep up with what it means.

The other thing is that -W is a good addition to -Wall. See the gcc 
man page for the extra checks this adds.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
"Open source is an intellectual-property destroyer. I can't
imagine something that could be worse than this for the software
business and the intellectual-property business."
 -- Jim Allchin, Microsoft
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to