Re: Setting -Werror in CFLAGS

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Setting -Werror in CFLAGS
Date: 2012-01-04 19:59:28
Message-ID: 4F04AFA0.1010007@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/04/2012 02:35 PM, Heikki Linnakangas wrote:
> On 04.01.2012 20:44, Robert Haas wrote:
>> On Tue, Jan 3, 2012 at 9:23 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>>>> On Tue, Jan 3, 2012 at 7:39 PM, Peter
>>>> Geoghegan<peter(at)2ndquadrant(dot)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. I'm clearly not the only one doing it this way, since
>> src/backend/parser/gram.o manually sticks in -Wno-error...
>
> I use "make -s".

Yeah, that's a good thing to do.

We are by far the most vigilant project I am aware of about fixing
warnings. That's a Good Thing (tm,). Build most FOSS software and you
see huge numbers of warnings fly by. It can get quite distressing.

We turn the errors off for gram.o precisely because we can't control it,
since the included source file scan.c is generated by flex.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2012-01-04 20:02:01 Re: Page Checksums + Double Writes
Previous Message Heikki Linnakangas 2012-01-04 19:35:44 Re: Setting -Werror in CFLAGS