Re: apply pragma system_header to python headers

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-25T17:36:50Z
Lists: pgsql-hackers

Attachments

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 one of my test machines to Fedora 39, I'm seeing these
Python warnings too.  So here's a fleshed-out patch proposal for doing
it like that.

			regards, tom lane

Commits

  1. Hide warnings from Python headers when using gcc-compatible compiler.