www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23185] New: importC: anonymous struct inside

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

          Issue ID: 23185
           Summary: importC: anonymous struct inside __builtin_offsetof
                    doesn't compile
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ryuukk.dev gmail.com

The following code doesn't compile:

```
void test()
{
    int a = __builtin_offsetof(struct { int a;}, a);
}
```

--
Jun 13 2022