makecontext signature (bug 27523)

Florian Weimer fweimer@redhat.com
Tue Dec 19 07:04:44 GMT 2023


* Andreas Schwab:

> On Dez 18 2023, Florian Weimer wrote:
>
>> What should we do here?  Should we treat void (*) (void) as the
>> canonical type and recommend adding this cast?
>
> All function pointers are alike, so you can pick any as the canonical
> type.

But that's not true if you want to avoid an incompatible-pointer-types
warning or error.  You need to use the type that matches the makecontext
argument.

I suppose we could add

typedef void (*makecontext_fptr_t) (void);
#define makecontext_fptr_t makecontext_fptr_t 

and tell application authors to use that, with a suitable #ifdef?  And
then convince the BSD/Solaris/Darwin/z/OS to adopt that as well?

Thanks,
Florian



More information about the Libc-alpha mailing list