Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Дата
Msg-id 334554.1663596005@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Mon, Sep 19, 2022 at 10:16 AM Thomas Munro <thomas.munro@gmail.com> wrote:
>> Huh... wouldn't systems that pass arguments right-to-left on the stack
>> receive NULL for node?  That'd include the SysV i386 convention used
>> on Linux, *BSD etc.  But that can't be right or we'd know about it...

> I take that back after looking up some long forgotten details; it
> happily ignores extra arguments.

Yeah; the fact that no one has complained in several years seems to
indicate that there's not a problem on supported platforms.  Still,
unlike the quibbles over whether char and struct pointers are the
same, it seems clear that this is the sort of inconsistency that
C2x wants to forbid, presumably in the name of making the world
safe for more-efficient function calling code.  So I think we'd
better go fix ExecShutdownNode before somebody breaks it.

Whichever way we jump on the tree-walker API changes, those won't
be back-patchable.  I think the best we can do for the back branches
is add a configure test to use -Wno-deprecated-non-prototype
if available.  But the ExecShutdownNode change could be back-patched,
and I'm leaning to doing so even though that breakage is just
hypothetical today.

            regards, tom lane



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cataloguing NOT NULL constraints