[Issue 15712] extern(C) cancelling itself out

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 4 12:38:25 UTC 2022


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

Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel at live.nl
           Severity|enhancement                 |normal

--- Comment #6 from Dennis <dkorpel at live.nl> ---
(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)`.

--


More information about the Digitalmars-d-bugs mailing list