Re: apply pragma system_header to python headers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: apply pragma system_header to python headers
Дата
Msg-id 3831479.1699282620@sss.pgh.pa.us
обсуждение исходный текст
Ответ на apply pragma system_header to python headers  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: apply pragma system_header to python headers  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> 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 feedback to Python to 
> fix their header files, but this is getting old, and we have an easier 
> solution now.)

+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.  So I think a prerequisite ought to be to get this out of
plpython.h:

/*
 * Used throughout, so it's easier to just include it everywhere.
 */
#include "plpy_util.h"

Alternatively, is there a way to reverse the effect of the
pragma after we've included what we need?

(I'm not too happy about the state of plperl.h on this point, either.)

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Moving forward with TDE [PATCH v3]
Следующее
От: Alexander Kukushkin
Дата:
Сообщение: Re: pg_rewind WAL segments deletion pitfall