[fpc-devel] Error: Procedure/Function declared with call option NOSTACKFRAME but without ASSEMBLER

Martin Frb lazarus at mfriebe.de
Thu Mar 20 23:30:28 CET 2025


On 20/03/2025 22:38, Marco van de Voort via fpc-devel wrote:
>
> Op 20-3-2025 om 20:46 schreef Martin Frb via fpc-devel:
>
>> So why does the compiler interpret NoStackFrame in the type 
>> declaration, when it does not do that for other non-relevant 
>> modifiers (like assembler)?
>
> I think it is because nostackframe is a directive for the declaration 
> of the function itself, to tell the stackframe generating code to skip 
> the stackframe. That is also why it is linked to assembler; directive, 
> since with assembler the compiler can't auto determine to generate a 
> stack frame.
>
> It has no relevance to the calling code, so it has no business in a 
> procedural type declaration.
>
> Maybe take a step back and try to describe what you want to achieve.

Nothing, I just stumbled on it. And wondered.

I know errors aren't necessarily always describing what a user would see 
as the error. But in this case, the compiler says that the error is the 
omission of another error. That is a novum. (well for me at least).



More information about the fpc-devel mailing list