Bug 20745 – __traits(getLinkage, T) returns "D" for extern (C) struct T

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-04-17T16:50:27Z
Last change time
2020-04-17T16:56:51Z
Assigned to
No Owner
Creator
karita

Comments

Comment #0 by shigekikarita — 2020-04-17T16:50:27Z
The following code reproduces the wrong linkage result. --- // https://wandbox.org/permlink/0kSYkUvi82gW9kRR extern (C) struct T {} void main() { assert(__traits(getLinkage, T) == "D"); // should be C }
Comment #1 by shigekikarita — 2020-04-17T16:56:51Z
Sorry I misunderstood.