Nested functions and their linkage type

Mike Parker aldacron at gmail.com
Sun Jan 24 02:31:50 UTC 2021


On Sunday, 24 January 2021 at 02:30:37 UTC, Mike Parker wrote:
> On Saturday, 23 January 2021 at 20:37:49 UTC, kdevel wrote:
>> In § 19.18.7 [1] it is said that
>>
>>    Nested functions always have the D function linkage type.
>>
>> Why and for what application is that important?
>
> I assume because of mangling. The outer function is mangled 
> into the nested function's name.
>

And also that nested functions needs to reference the stack of 
the enclosing function.


More information about the Digitalmars-d-learn mailing list