additional GCC warnings - Mailing list pgsql-hackers

From Neil Conway
Subject additional GCC warnings
Date
Msg-id 417263F8.4060102@samurai.com
Whole thread Raw
Responses Re: additional GCC warnings
List pgsql-hackers
Recent versions of GCC support some additional warning flags that I 
think would be useful to enable for building PostgreSQL:

-Wmissing-declarations ("Warn if a global function is defined without a 
previous declaration.")

-Wdeclaration-after-statement (Recent versions of GCC allow declarations 
and statements to be intermixed in C; enabling this flag would enforce 
the current convention of avoiding this style.)

-Wold-style-definition (Warn if K&R-style function definitions are used.)

For the most part it won't take a lot of work to enable these flags. 
Some code we imported into the tree from elsewhere might need to be 
updated for -Wold-style-definition, but that should be easy.

Since some of these flags were added to GCC relatively recently, we 
would probably need to test if the local gcc supports the flags via 
configure.

Comments?

-Neil


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Nearing final release?
Next
From: Andrew Dunstan
Date:
Subject: Re: 7.4 changes