From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: additional GCC warning flags |
Date: | 2004-10-19 04:22:40 |
Message-ID: | 1098159760.1113.107.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-10-19 06:38:43 | Re: additional GCC warning flags |
Previous Message | Euler Taveira de Oliveira | 2004-10-19 04:15:37 | Translation updates: pt_BR |