Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-03 Thread Tom Lane
I wrote: > It occurs to me that we should now be able to drop configure's > probe for -Wno-compound-token-split-by-macro, since that was only > needed to suppress warnings in the Perl headers. ... or not. A bit of experimentation says that they still come out, apparently because the warnings are

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-03 Thread Tom Lane
Andres Freund writes: > On 2023-01-02 15:46:36 -0800, Andres Freund wrote: >> I haven't seen any problems in HEAD, so I'm working on backpatching. > And done. It occurs to me that we should now be able to drop configure's probe for -Wno-compound-token-split-by-macro, since that was only needed

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-02 Thread Andres Freund
On 2023-01-02 15:46:36 -0800, Andres Freund wrote: > On 2022-12-29 13:40:13 -0800, Andres Freund wrote: > > > > 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. > > >

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-02 Thread Andres Freund
Hi, On 2022-12-29 13:40:13 -0800, Andres Freund wrote: > > > 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. > > Pushed to HEAD. I haven't

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-29 Thread Andres Freund
Hi, On 2022-12-29 13:51:37 -0500, Tom Lane wrote: > We might find that some GCC-impostor compilers have trouble with it, > but if so we can adjust the #ifdef here. Yea. I suspect it's widely enough used that any compiler claiming to be gcc compatible has it, but ... > Getting nitpicky, I

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-29 Thread Tom Lane
Andres Freund 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.

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-29 Thread Andres Freund
Hi, On 2022-12-28 19:05:35 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-12-28 13:43:27 -0500, Tom Lane wrote: > >> Hmm ... I guess the buildfarm would tell us whether that detection works > >> correctly on platforms where it matters. Let's keep it simple if we > >> can. > > >

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-28 Thread Tom Lane
Andres Freund writes: > On 2022-12-28 13:43:27 -0500, Tom Lane wrote: >> Hmm ... I guess the buildfarm would tell us whether that detection works >> correctly on platforms where it matters. Let's keep it simple if we >> can. > Quick clarification question: Are you suggesting to use #ifdef

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-28 Thread Andres Freund
On 2022-12-28 13:43:27 -0500, Tom Lane wrote: > > In the compiler test, I chose to not check whether -Werror=unknown-pragmas > > is > > supported - it appears to be an old gcc flag, and the worst outcome is that > > HAVE_PRAGMA_SYSTEM_HEADER isn't defined. > > We could alternatively define

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-28 Thread Tom Lane
Andres Freund writes: > The attached *prototype* patch is a slightly different spin on the idea of > using -isystem: It adds a > #pragma GCC system_header > to plperl.h if supported by the compiler. That also avoids warnings from > within plperl and subsidiary headers. > I don't really have an

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-12-28 Thread Andres Freund
Hi, On 2022-11-02 17:03:34 -0700, Andres Freund wrote: > On 2022-11-02 19:57:45 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2022-11-01 17:00:27 -0400, Peter Eisentraut wrote: > > >> Python has the same issues. There are a few other Python-embedding > > >> projects > > >> that use

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-02 Thread Andres Freund
Hi, On 2022-11-02 19:57:45 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-11-01 17:00:27 -0400, Peter Eisentraut wrote: > >> Python has the same issues. There are a few other Python-embedding > >> projects > >> that use -Wdeclaration-after-statement and complain if the Python

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-02 Thread Tom Lane
Andres Freund writes: > On 2022-11-01 17:00:27 -0400, Peter Eisentraut wrote: >> Python has the same issues. There are a few other Python-embedding projects >> that use -Wdeclaration-after-statement and complain if the Python headers >> violate it. But it's getting tedious. -isystem would be a

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-02 Thread Andres Freund
Hi, On 2022-11-01 17:00:27 -0400, Peter Eisentraut wrote: > On 01.11.22 19:01, Andres Freund wrote: > > I don't know how much longer we can rely on headers being > > -Wdeclaration-after-statement clean, my impression is that people don't > > have a > > lot of patience for C89isms anymore. > > >

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-01 Thread Peter Eisentraut
On 01.11.22 19:01, Andres Freund wrote: I don't know how much longer we can rely on headers being -Wdeclaration-after-statement clean, my impression is that people don't have a lot of patience for C89isms anymore. I wonder if we should try to use -isystem for a bunch of external dependencies.

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-01 Thread Dagfinn Ilmari Mannsåker
Andres Freund writes: > Hi, > > Tom pinged me privately because mylodon, an animal enforcing C89/C99 > compatibility, was failed. This is due to perl on the machine being upgraded > to perl 5.36. > > Mylodon was failing because of: > > configure:18839: ccache clang-13 -c -Wall

perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2022-11-01 Thread Andres Freund
Hi, Tom pinged me privately because mylodon, an animal enforcing C89/C99 compatibility, was failed. This is due to perl on the machine being upgraded to perl 5.36. Mylodon was failing because of: configure:18839: ccache clang-13 -c -Wall -Wmissing-prototypes -Wpointer-arith