pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Hide warnings from Python headers when using gcc-compatible comp
Date: Tue, 26 Dec 2023 21:16:56 +0000
Message-ID: <E1rIEnI-00C3EI-Bw@gemulon.postgresql.org> (raw)

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

Like commit 388e80132, use "#pragma GCC system_header" to silence
warnings appearing within the Python headers, since newer Python
versions no longer worry about some restrictions we still use like
-Wdeclaration-after-statement.

This patch improves on 388e80132 by inventing a separate wrapper
header file, allowing the pragma to be tightly scoped to just
the Python headers and not other stuff we have laying about in
plpython.h.  I applied the same technique to plperl for the same
reason: the original patch suppressed warnings for a good deal
of our own code, not only the Perl headers.

Like the previous commit, back-patch to supported branches.

Peter Eisentraut and Tom Lane

Discussion: https://postgr.es/m/ae523163-6d2a-4b81-a875-832e48dec502@eisentraut.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1613e2fae1ab4d66d949a00e7378721f2c8dcfbe

Modified Files
--------------
src/pl/plperl/GNUmakefile         |   4 +-
src/pl/plperl/plperl.h            | 194 +---------------------------------
src/pl/plperl/plperl_system.h     | 214 ++++++++++++++++++++++++++++++++++++++
src/pl/plpython/Makefile          |   3 +-
src/pl/plpython/plpython.h        | 134 +-----------------------
src/pl/plpython/plpython_system.h | 164 +++++++++++++++++++++++++++++
6 files changed, 388 insertions(+), 325 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1rIEnI-00C3EI-Bw@gemulon.postgresql.org>
Permalink:  ../E1rIEnI-00C3EI-Bw@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rIEnI-00C3EI-Bw@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Hide warnings from Python headers when using gcc-compatible comp
  In-Reply-To: <E1rIEnI-00C3EI-Bw@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox