Re: Fix C23 compiler warning
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-10-20T15:56:55Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes: > This no longer works because in C23, because an empty argument list is > now equivalent to (void), rather than an indeterminate one as before. > And so this results in an incompatible function pointer type and > compiler warnings. (gcc and clang agree on this.) > I think we can fix this easily with a few struct forward declarations, > preserving the goal of not including extra header files, like this: Do the struct declarations themselves need comments? Other places do this like struct PlannerInfo; /* avoid including pathnodes.h here */ LGTM other than that nit. regards, tom lane
Commits
-
Fix C23 compiler warning
- f7a929a007e6 16.7 landed
- f3834c12afd8 17.3 landed
- d2b4b4c2259e 18.0 landed
-
Rename C23 keyword
- a67a49648d98 18.0 cited