[Issue 15712] extern(C) cancelling itself out

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 4 11:39:42 UTC 2022


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

--- Comment #5 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to John Colvin from comment #4)
> Why would I want an extern(C) static function as a local? One simple
> use-case would be to pass to a C function to use as a callback.
> 
> But that is not the point of this bug report. The point of the bug report is
> that typeof(foo) is extern(C) but typeof(baz) is not.

What I meant was: why would you want static/non-static nested functions to
inherit the upper level linkage attribute? I would argue that in most
situations nested functions are not made to be escaped (as callbacks) but if
that situation arises the programmer can manually add extern(C).

--


More information about the Digitalmars-d-bugs mailing list