[Issue 22399] New: importC: Error: static variable cannot be read at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 17 13:12:50 UTC 2021


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

          Issue ID: 22399
           Summary: importC: Error: static variable cannot be read at
                    compile time
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

GCC compiles this without problems.
---
struct S1
{
    unsigned short f1;
};
struct S2
{
    const struct S1 *f1;
};
const struct S1 C1[1] = { {12} };
const struct S2 C3 = {C1};
---

--


More information about the Digitalmars-d-bugs mailing list