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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Date: 2022-09-19 14:00:05
Message-ID: 334554.1663596005@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Mon, Sep 19, 2022 at 10:16 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-09-19 14:08:52 Re: cataloguing NOT NULL constraints
Previous Message Bharath Rupireddy 2022-09-19 13:56:57 Add LSN along with offset to error messages reported for WAL file read/write/validate header failures