From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: additional GCC warning flags |
Date: | 2004-10-18 17:21:04 |
Message-ID: | 200410181721.i9IHL4918398@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Agreed, I see no harm in adding it now.
---------------------------------------------------------------------------
Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
> > 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
>
> As long as it can only introduce warnings and not errors, I think it is
> fine to apply now. It might help us flush out some portability issues
> --- we are just coming up on the stage of officially calling for port
> reports for 8.0, so it seems like now is a good time to put it in.
>
> One thing I'd suggest is that the "if test "$GCC" = yes; then"
> conditional go outside the PGAC macros, ie
>
> if test "$GCC" = yes; then
> PGAC_PROG_CC_WARN_DECL_AFTER_STMT
> PGAC_PROG_CC_WARN_OLD_STYLE_DEFN
> PGAC_PROG_CC_WARN_ENDIF_LABELS
> fi
>
> as otherwise people with non-gcc compilers will think configure is
> pretty stupid even to be making the tests.
>
> Also, how about removing the conditional CFLAGS hacking from
> Makefile.global.in entirely, and change the above to
>
> if test "$GCC" = yes; then
> CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
> PGAC_PROG_CC_WARN_DECL_AFTER_STMT
> PGAC_PROG_CC_WARN_OLD_STYLE_DEFN
> PGAC_PROG_CC_WARN_ENDIF_LABELS
> fi
>
> which localizes the logic a tad more, and keeps the CFLAGS entries in a
> rational-looking order.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-10-18 17:22:00 | Re: windows progname / regression fixes |
Previous Message | Tom Lane | 2004-10-18 17:19:30 | Re: additional GCC warning flags |