On Fri, 21 Oct 2022, Florian Weimer via Gcc wrote:

> Is this really possible?  For function pointers, it's an ABI change.
> int (*) () and int (*) (void) have different calling conventions on some
> ABIs (e.g., powerpc64le-linux-gnu).  The ABI difference goes away once
> the callees are rebuilt, and I think such rebuilt callees are compatible
> with either calling convention.

The semantics of int (*) (void) are a refinement of those of pre-C2x 
int (*) (): any non-variadic function whose argument types are unchanged 
by the default argument promotions can be called through an int (*) () 
pointer, but only functions with no arguments can be called through an 
int (*) (void) pointer.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to