Skip site navigation (1) Skip section navigation (2)

Re: additional GCC warning flags

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 (view raw, whole thread or download thread mbox)
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

-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.


In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2004-10-19 06:38:43
Subject: Re: additional GCC warning flags
Previous:From: Euler Taveira de OliveiraDate: 2004-10-19 04:15:37
Subject: Translation updates: pt_BR

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group