[Issue 15712] nested functions in unittests extern(C) not applied

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 3 13:38:20 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=15712

--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
Why do you expect that extern(C) should apply deeply for nested functions? As
far as I know it only applies to the first level of declarations. That was the
case for attributes also before nested functions got their attributes inferred.

Also, why would you want it to have extern(C) linkage? Technically it's
callable from inside the unittest/function (which is actually D code, even if
the function is callable from C), which means it technically cannot be called
from C code (except if you escape it somehow, but I assume those cases to be
rare). Either way, I think that this bug is not valid. Do you have a compelling
use case for this?

--


More information about the Digitalmars-d-bugs mailing list