[Issue 15712] extern(C) cancelling itself out

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 4 12:44:43 UTC 2022


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

--- Comment #7 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to Dennis from comment #6)
> (In reply to RazvanN from comment #5)
> > but if that situation arises the programmer can manually add extern(C).
> 
> But extern(C) *is* manually added. This is the buggy part:
> ```
> extern(C):
> unittest
> {
>     extern(C) void baz() {}
>     pragma(msg, "typeof(baz): ", typeof(baz));
> }
> ```
> 
> `baz` is not `extern(C)` like this, but either *removing* `extern(C):` or
> changing the unittest to a regular function will make `baz` `extern(C)`.

Aaah, ok, sorry, I don't know what happened. When I tested last time it seemed
the extern(C) was there in the above example and I misunderstood the bug report
as being about extern(C) not propagating for nested functions. I might have
miscompiled the example. Sorry for the noise. Yes, this is definitely a bug.

--


More information about the Digitalmars-d-bugs mailing list