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 1725174.1651449765@sss.pgh.pa.us
Whole thread Raw
In response to Tree-walker callbacks vs -Wdeprecated-non-prototype  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> As visible on seawasp (and noticed here in passing, while hacking on
> the opaque pointer changes for bleeding edge LLVM), Clang 15 now warns
> by default about our use of tree walkers functions with no function
> prototype, because the next revision of C (C23?) will apparently be
> harmonising with C++ in interpreting f() to mean f(void), not
> f(anything goes).

Ugh.  I wonder if we can get away with declaring the walker arguments
as something like "bool (*walker) (Node *, void *)" without having
to change all the actual walkers to be exactly that signature.
Having to insert casts in the walkers would be a major pain-in-the-butt.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: Libpq single-row mode slowness
Next
From: Peter Smith
Date:
Subject: Re: Handle infinite recursion in logical replication setup