Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers@postgresql.org, David Rowley <dgrowleyml@gmail.com>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Date: 2022-12-29T18:51:37Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > It turns out to not work terribly well. gcc, quite reasonably, warns about the > pragma used in .c files, and there's no easy way that I found to have autoconf > name its test .h. We could include a test header in the compile test, but 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 compiler "Newer versions of ..." please. Otherwise LGTM. > Should we backpatch this? Given the volume of warnings it's probably a good > idea. But I'd let it step in HEAD for a few days of buildfarm coverage first. +1 to both points. regards, tom lane
Commits
-
perl: Hide warnings inside perl.h when using gcc compatible compiler
- 99f8bc335cbe 11.19 landed
- f0e13802f196 12.14 landed
- ce073d01445c 13.10 landed
- 7b5dec760f7d 14.7 landed
- c6e75e4c2703 15.2 landed
- 388e80132c00 16.0 landed