Re: Tree-walker callbacks vs -Wdeprecated-non-prototype - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Date
Msg-id 334554.1663596005@sss.pgh.pa.us
Whole thread Raw
In response to Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
List 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 by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Next
From: Tom Lane
Date:
Subject: Re: cataloguing NOT NULL constraints