]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Hide warnings from Python headers when using gcc-compatible compiler.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 26 Dec 2023 21:16:29 +0000 (16:16 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 26 Dec 2023 21:16:29 +0000 (16:16 -0500)
commit5f8d6d7097fee4aa3a6da056489e03b7b1a98871
tree09e8ec60944ae08fc75c295c062018944e43e422
parentad4a9f1f73e97f5ef7469df506e920c459f5361d
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
src/pl/plperl/GNUmakefile
src/pl/plperl/plperl.h
src/pl/plperl/plperl_system.h [new file with mode: 0644]
src/pl/plpython/Makefile
src/pl/plpython/plpython.h
src/pl/plpython/plpython_system.h [new file with mode: 0644]