Re: Setting -Werror in CFLAGS - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Setting -Werror in CFLAGS
Date
Msg-id 20120207175145.GM19450@momjian.us
Whole thread Raw
In response to Re: Setting -Werror in CFLAGS  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Jan 04, 2012 at 01:44:07PM -0500, Robert Haas wrote:
> On Tue, Jan 3, 2012 at 9:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Robert Haas <robertmhaas@gmail.com> writes:
> >> On Tue, Jan 3, 2012 at 7:39 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> >>> Yes, I know that these only appeared in GCC 4.6+ and as such are a
> >>> relatively recent phenomenon, but there has been some effort to
> >>> eliminate them, and if I could get a non-hacked -Werror build I'd feel
> >>> happy enough about excluding them as already outlined.
> >
> >> I just do this:
> >> echo COPT=-Werror > src/Makefile.custom
> >> ...which seems to work reasonably well.
> >
> > I see no point in -Werror whatsoever.  If you aren't examining the make
> > output for warnings, you're not following proper development practice
> > IMO.
> 
> I find -Werror to be a convenient way to examine the output for
> warnings.  Otherwise they scroll off the screen.  Yeah, I could save
> the output to a file and grep it afterwards, but that seems less
> convenient.

Our src/tools/pgtest does this:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/tools/pgtest;hb=HEAD

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: When do we lose column names?
Next
From: Jay Levitt
Date:
Subject: Bugs/slowness inserting and indexing cubes