additional GCC warnings

From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: additional GCC warnings
Date: 2004-10-17 12:22:16
Message-ID: 417263F8.4060102@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-10-17 12:25:51 Re: 7.4 changes
Previous Message Greg Stark 2004-10-17 05:10:14 Re: Nearing final release?