Re: additional GCC warning flags - Mailing list pgsql-patches

From Tom Lane
Subject Re: additional GCC warning flags
Date
Msg-id 10719.1098152518@sss.pgh.pa.us
Whole thread Raw
In response to Re: additional GCC warning flags  (Neil Conway <neilc@samurai.com>)
Responses Re: additional GCC warning flags
Re: additional GCC warning flags
List pgsql-patches
Neil Conway <neilc@samurai.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

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: additional GCC warning flags
Next
From: Zhenbang Wei
Date:
Subject: Update 7 zh_TW message files for 8.0