Skip site navigation (1) Skip section navigation (2)

Re: additional GCC warning flags

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: additional GCC warning flags
Date: 2004-10-19 06:38:43
Message-ID: 1098167923.1113.269.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
On Tue, 2004-10-19 at 11:59, Neil Conway wrote:
> -Wpointer-arith might be worth enabling. I'll add it to the GCC CFLAGS
> in the next patch I send in.

Attached is a revised patch. Changes:

- add -Wpointer-arith to the default CFLAGS when using GCC

- add an AC macro AC_PROG_CC_CFLAGS_OPT that checks if $CC supports the
specified command-line option and adds it to the CFLAGS if it does

- replace the hard-coded test for -fno-strict-aliasing with
AC_PROG_CC_CFLAGS, and use AC_PROG_CC_CFLAGS to check for
-Wendif-labels, -Wdeclaration-after-statement, and

Barring any objections, I will apply this to CVS tomorrow.

BTW, since we're on the topic of compiler options, is there a reason we
don't use -g3 with GCC when --enable-debug is specified? It seems worth
using to me.


Attachment: conf_gcc_warn-3.patch
Description: text/x-patch (10.0 KB)

In response to


pgsql-patches by date

Next:From: Dave PageDate: 2004-10-19 07:40:10
Subject: Re: Win32 psql fix
Previous:From: Neil ConwayDate: 2004-10-19 04:22:40
Subject: Re: additional GCC warning flags

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group