H
Harald van Dijk
Is it legal for an implementation to include implementation specific
magic (calling conventions for example) in its standard library function
declarations?
This is allowed if without including the function's header, you can still
call the function by declaring it manually with a compatible function
declaration, with or without a prototype, and if after including the
function's header the function can be assigned to a compatible function
pointer and called like that. This allows alternate calling conventions,
if the calling convention specifies that the function saves more
registers than usual, for example. It does not allow alternate calling
conventions if arguments are passed via a different mechanism.