Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-09-19T07:30:09Z
Lists: pgsql-hackers
On Mon, Sep 19, 2022 at 4:53 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@gmail.com> writes: > > On Mon, Sep 19, 2022 at 3:39 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > >> I also note that our existing code in this area would break pretty > >> thoroughly on such a machine, so this isn't making it worse. > > > Yeah, I don't expect it to be a practical problem on any real system > > (that is, I don't expect any real calling convention to transfer a > > struct T * argument in a different place than void *). I just wanted > > to mention that it's a new liberty. > > No, it's not, because the existing coding here is already assuming that. > The walker callbacks are generally declared as taking a "struct *" > second parameter, but expression_tree_walker et al think they are > passing a "void *" to them. Even if a platform ABI had some weird > special rule about how to call functions that you don't know the > argument list for, it wouldn't fix this because the walkers sure do know > what their arguments are. The only reason this code works today is that > in practice, "void *" *is* ABI-compatible with "struct *". True. > I'm not excited about creating a demonstrable opportunity for bugs > in order to make the code hypothetically more compatible with > hardware designs that are thirty years obsolete. (Hypothetical > in the sense that there's little reason to believe there would > be no other problems.) Fair enough.
Commits
-
Remove accidentally added meson.build
- e7480f3dd6c2 13.22 landed
-
Disable clang 16's -Wcast-function-type-strict.
- 27831127d641 14.13 landed
- 6e2552d180a0 15.8 landed
- 101c37cd342a 16.0 landed
-
Disable -Wdeprecated-non-prototype in the back branches.
- 8c8ee5c99144 9.3 (unreleased) landed
- 5d3ce0d823c8 9.2 (unreleased) landed
- f9a56e726334 15.0 landed
- dcd7dbed5008 14.6 landed
- ca8fd341e165 9.6 (unreleased) landed
- 9afdf395042a 11.18 landed
- 7d5d3f05bfab 9.4 (unreleased) landed
- 52a5fd5b9f8f 12.13 landed
- 4c5a29c0e5e1 10.23 landed
- 43f72e0f73a5 13.9 landed
- 1b698659970e 9.5 (unreleased) landed
-
Revise tree-walk APIs to improve spec compliance & silence warnings.
- 1c27d16e6e5c 16.0 landed
-
Future-proof the recursion inside ExecShutdownNode().
- c35ba141de1f 16.0 landed
- cb7d636e0fb2 11.18 landed
- c58513f095e2 13.9 landed
- c403f97b4eab 15.0 landed
- adc26e0e88b3 12.13 landed
- 7394c763bc72 14.6 landed
- 68707e9c3f32 10.23 landed