From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fix C23 compiler warning |
Date: | 2024-10-22 06:35:14 |
Message-ID: | 96e5cd15-a8a2-4ffd-b1fa-2f63583e2db0@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 20.10.24 17:56, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)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.
Committed with that change. Thanks.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-10-22 06:41:16 | Re: Fix C23 compiler warning |
Previous Message | Andrey M. Borodin | 2024-10-22 06:29:48 | Re: Using read_stream in index vacuum |