Op 20-3-2025 om 20:09 schreef Martin Frb via fpc-devel:
It is possible to declare a type for a cdecl function like
type a=procedure cdecl;
But, not for "assembler" which makes sense, because its not a calling
convention. Same should likely be the case for NoStackframe.
Roughly yes. Basically a procedure variable is a contract which should
give the calling situation enough information to call the said function.
But
program Project1;
type a=procedure {assembler} NoStackFrame ;
begin
end.
assembler is a comment?
gives a different error?
Which error do you mean? Not to be facetious, just that errors might
depend on architecture.
Should it?
The bar is twofold, the first, as said, being that the calling side
must have enough information to call the result in all circumstances
(read: on all targets), and the second , minor one, if that if there is
an exception for parameterless functions, if it is worth to implement an
exception.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel