[Issue 20745] New: __traits(getLinkage, T) returns "D" for extern (C) struct T

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 17 16:50:27 UTC 2020


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

          Issue ID: 20745
           Summary: __traits(getLinkage, T) returns "D" for extern (C)
                    struct T
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: shigekikarita at gmail.com

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
}

--


More information about the Digitalmars-d-bugs mailing list