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 1pAy0H-0000Oz-Sn for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Dec 2022 18:51:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAy0G-00065U-NJ for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Dec 2022 18:51:44 +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 1pAy0G-00065L-Dr for pgsql-hackers@lists.postgresql.org; Thu, 29 Dec 2022 18:51:44 +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 1pAy0E-0005ID-8X for pgsql-hackers@postgresql.org; Thu, 29 Dec 2022 18:51:43 +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 2BTIpbVI586730; Thu, 29 Dec 2022 13:51:37 -0500 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , pgsql-hackers@postgresql.org, David Rowley , Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= Subject: Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local In-reply-to: <20221229184236.3v7bvsumefpslq7h@awork3.anarazel.de> References: <20221101180158.l4zg6ljah5ow2vvo@awork3.anarazel.de> <20221102234346.zcupk5mqysavci4t@awork3.anarazel.de> <1881935.1667433465@sss.pgh.pa.us> <20221103000334.sbh5jqw37i3y7pc3@awork3.anarazel.de> <20221228182455.hfdwd22zztvkojy2@awork3.anarazel.de> <356473.1672253007@sss.pgh.pa.us> <20221229000223.2pdwxexfrgoximul@awork3.anarazel.de> <438139.1672272335@sss.pgh.pa.us> <20221229184236.3v7bvsumefpslq7h@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 29 Dec 2022 10:42:36 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <586728.1672339897.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 29 Dec 2022 13:51:37 -0500 Message-ID: <586729.1672339897@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > It turns out to not work terribly well. gcc, quite reasonably, warns abo= ut the > pragma used in .c files, and there's no easy way that I found to have au= toconf > name its test .h. We could include a test header in the compile test, bu= t that > also adds some complication. As gcc has supported the pragma since 2000,= I > think a simple > #ifdef __GNUC__ > #define HAVE_PRAGMA_SYSTEM_HEADER 1 > #endif > should suffice. We might find that some GCC-impostor compilers have trouble with it, but if so we can adjust the #ifdef here. Getting nitpicky, I suggest calling it "HAVE_PRAGMA_GCC_SYSTEM_HEADER" to align better with what you actually have to write. Also: + * Newer versions the perl headers trigger a lot of warnings with our com= piler "Newer versions of ..." please. Otherwise LGTM. > Should we backpatch this? Given the volume of warnings it's probably a g= ood > idea. But I'd let it step in HEAD for a few days of buildfarm coverage f= irst. +1 to both points. regards, tom lane