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 02:21:58
Message-ID: 10719.1098152518@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:
> -Wpointer-arith might be worth enabling. I'll add it to the GCC CFLAGS
> in the next patch I send in.

If PG builds cleanly or nearly so with it on, by all means.

> As you said, -Wcast-align can't be enabled in general at the moment
> because it flags a ton of warnings on certain platforms (at least on
> IA64, probably other 64-bit platforms as well).

Yes, HPPA as well. I have long harbored a wish to clean this up but
it never gets to the top of the to-do list. I am not sure that it would
really repay the effort to make the code clean against this --- I can
only recall one or two bugs in the last several years that this might
have caught.

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?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Richard Sydney-Smith 2004-10-19 03:36:47 Re: Where is the link to cygwin?
Previous Message Neil Conway 2004-10-19 01:59:10 Re: additional GCC warning flags