Re: apply pragma system_header to python headers

2023-12-25 Thread Tom Lane
I wrote: > Probably a better way is to invent a separate header "plpython_system.h" > that just includes the Python headers, to scope the pragma precisely. > (I guess it could have the fixup #defines we're wrapping those headers > in, too.) > The same idea would work in plperl. After updating

Re: apply pragma system_header to python headers

2023-11-06 Thread Tom Lane
Andrew Dunstan writes: > On 2023-11-06 Mo 09:57, Tom Lane wrote: >> +1 for the concept --- I was just noticing yesterday that my buildfarm >> warning scraping script is turning up some of these. However, we ought >> to try to minimize the amount of our own code that is subject to the >> pragma.

Re: apply pragma system_header to python headers

2023-11-06 Thread Andrew Dunstan
On 2023-11-06 Mo 09:57, Tom Lane wrote: Peter Eisentraut writes: Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h. Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12. (In

Re: apply pragma system_header to python headers

2023-11-06 Thread Tom Lane
Peter Eisentraut writes: > Analogous to 388e80132c (which was for Perl) but for Python, I propose > adding #pragma GCC system_header to plpython.h. Without it, you get > tons of warnings about -Wdeclaration-after-statement, starting with > Python 3.12. (In the past, I have regularly sent

Re: apply pragma system_header to python headers

2023-11-06 Thread Andrew Dunstan
On 2023-11-06 Mo 07:02, Peter Eisentraut wrote: Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h.  Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12.  (In the past, I have

apply pragma system_header to python headers

2023-11-06 Thread Peter Eisentraut
Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h. Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12. (In the past, I have regularly sent feedback to Python to fix their