pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Add -Wold-style-definition to CFLAGS?
Date: Tue, 09 Jun 2020 02:03:09 -0400
Message-ID: <2192993.1591682589@sss.pgh.pa.us> (raw)
In-Reply-To: <20200609054708.52h6rdasqkjh32xv@alap3.anarazel.de>
References: <20200509174820.g4bwftmz7blz35ph@alap3.anarazel.de>
	<4838.1589048101@sss.pgh.pa.us>
	<20200509184354.hpkxuvip64nlnqve@alap3.anarazel.de>
	<19295.1589065916@sss.pgh.pa.us>
	<20200609054708.52h6rdasqkjh32xv@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> Unfortunately it turns out that our CFLAG configure tests don't reliably
> work with -Wold-style-definition. The problem is that the generated
> program contains 'int main() {...}', which obviously is an old-style
> definition. Which then causes a warning, which in turn causes the cflag
> tests to fail because we run them with ac_c_werror_flag=yes.

Ugh.  I suspect main() might not be the only problem, either.

> Upstream autoconf has fixed this in 2014 (1717921a), but since they've
> not bothered to release since then...

I wonder if there's any way to light a fire under them.

> The easiest way that I can see to deal with that is to simply redefine
> the relevant autoconf macro. For me that solves the vast majority of
> these bleats in config.log.  That's not particularly pretty, but we have
> precedent for it... Since it's just 16 lines, I think we can live with
> that?

I don't really think that -Wold-style-definition is worth that.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <2192993.1591682589@sss.pgh.pa.us>
Permalink:  ../2192993.1591682589@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2192993.1591682589@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, noah@leadboat.com
  Subject: Re: Add -Wold-style-definition to CFLAGS?
  In-Reply-To: <2192993.1591682589@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox