wide function pointer type

Daniel Colascione dancol@dancol.org
Sun Oct 10 17:49:22 GMT 2021


On October 10, 2021 10:44:32 Martin Uecker via Libffi-discuss 
<libffi-discuss@sourceware.org> wrote:

> Am Sonntag, den 10.10.2021, 10:01 -0700 schrieb Kaz Kylheku (libffi):
>> On 2021-10-10 04:32, Martin Uecker via Libffi-discuss wrote:
>>> Hi all,
>>>
>>> I will propose a wide function pointer type (actually
>>> a wide function type) to WG14 for C23 as a common
>>> type for callbacks, closures, which now require an
>>> additional void pointer argument in C APIs. This
>>> is intended to be compatible with ABIs with now
>>> use a static chain register.
>>
>> Opposed. There is nothing wrong with separate arguments
>> for function pointer and context.
>
> Noted.  Your argument sbelow all boil down to the point
> that there are cases where it might not be the ideal
> choice. But nobody forces anyone to use it.


>
"I like it" is not by itself a rationale for including something in a core 
language standard. This is not something that should be in C. Why, 
precisely, can't you just define a struct with two fields and make that 
your closure type?


More information about the Libffi-discuss mailing list