On Tue, 2004-10-19 at 12:21, Tom Lane wrote:
> When I looked at the current gcc Info docs, I noticed that there seem to
> be several new warning types that might be worth turning on. Did you
> consider others beyond the three you're proposing now?
I took a look through the list, but I probably missed a few useful
options.
-Wcast-qual emits too many warnings, as does -Wsign-compare.
-Wstrict-prototypes causes a few distinct warnings but they are emitted
repeatedly. At least one does not seem easily solvable:
expression_tree_walker() and friends declare the callback function as
bool (*walker) (), but it seems a pain to make that type declaration
more precise.
-Wnested-externs causes a single warning (postmaster.c:580) that seems
fixable, so that might be worth enabling.
-Waggregate-return emits a lot of warnings (since it flags both the call
site and the definition of a function that returns an aggregate type),
but there are relatively few offending functions: GetRedoRecPtr,
XLogInsert(), log_heap_clean(), log_heap_update(), log_heap_move(),
BufferGetFileNode() and SetOutput() (in pg_dump).
If I've missed any you think might be useful, let me know.
-Neil