Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiXLx-0007Nq-B8 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2020 06:03:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jiXLw-0001LB-7A for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2020 06:03:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiXLv-0001L4-Vk for pgsql-hackers@lists.postgresql.org; Tue, 09 Jun 2020 06:03:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiXLt-00026j-On for pgsql-hackers@postgresql.org; Tue, 09 Jun 2020 06:03:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 059639s62192994; Tue, 9 Jun 2020 02:03:09 -0400 From: Tom Lane To: Andres Freund cc: Noah Misch , pgsql-hackers@postgresql.org Subject: Re: Add -Wold-style-definition to CFLAGS? 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> Comments: In-reply-to Andres Freund message dated "Mon, 08 Jun 2020 22:47:08 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2192992.1591682589.1@sss.pgh.pa.us> Date: Tue, 09 Jun 2020 02:03:09 -0400 Message-ID: <2192993.1591682589@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund 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