Re: additional GCC warning flags

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
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 16:16:47
Message-ID: 16583.1098202607@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> -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.

Yeah; I deliberately left that callback weakly typed, because it seemed
that the alternative was to expect every caller to cast, which would
effectively disable any error checking you might hope to get anyway :-(

> -Wnested-externs causes a single warning (postmaster.c:580) that seems
> fixable, so that might be worth enabling.

Agreed. That extern is pretty bogus in itself...

> If I've missed any you think might be useful, let me know.

-Wbad-function-cast might possibly be interesting, although I'm afraid
it would be likely to barf on some of our Datum<=>pointer conversions.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Fabien COELHO 2004-10-19 16:33:13 Re: pg_regress --temp-keep
Previous Message Tom Lane 2004-10-19 16:07:54 Re: additional GCC warning flags