Re: additional GCC warning flags

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: additional GCC warning flags
Date: 2004-10-18 11:43:31
Message-ID: 200410181143.i9IBhV004537@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


FYI, I also use:

-Wpointer-arith -Wcast-align

locally. I think -Wcast-align throws errors on some platforms and can't
be use generally.

---------------------------------------------------------------------------

Neil Conway wrote:
> This patch adds code to "configure" to check if GCC supports the
> following warning flags: -Wdeclaration-after-statement (GCC 3.4+),
> -Wold-style-definition (GCC 3.4+), and -Wendif-labels (GCC 3.3+). Any of
> these options that are supported by $CC are added to $CFLAGS. The patch
> also removes -Wmissing-declarations from the default CFLAGS, on the
> grounds that it is (I believe) redundant when -Wmissing-prototypes is
> also specified.
>
> (I didn't mention -Wendif-labels in my mail to -hackers, but it should
> be pretty innocuous: "Warn whenever an #else or an #endif are followed
> by text.")
>
> This patch updates configure.in and configure (I re-ran autoconf 2.53).
> It doesn't introduce any additional warning messages locally (Linux, GCC
> 3.4), but might do so on some platforms (the code in src/port/ is likely
> to trigger some warnings, I think). Because of that, I think it is
> probably best to save this for 8.1
>
> -Neil
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Abhijit Menon-Sen 2004-10-18 12:33:01 Re: Nearing final release?
Previous Message Fabien COELHO 2004-10-18 08:58:46 Re: pg_regress --temp-keep