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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-02T00:02:45Z
Lists: 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



Commits

  1. Remove accidentally added meson.build

  2. Disable clang 16's -Wcast-function-type-strict.

  3. Disable -Wdeprecated-non-prototype in the back branches.

  4. Revise tree-walk APIs to improve spec compliance & silence warnings.

  5. Future-proof the recursion inside ExecShutdownNode().