www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22749] New: importC: C11 does not allow taking the address of

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

          Issue ID: 22749
           Summary: importC: C11 does not allow taking the address of a
                    bit-field
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

DMD happily compiles this C11 code.
---
struct bit
{
  int v : 1;
};

int main()
{
  struct bit b;
  void* ptr = &b.v;
}
---

--
Feb 08 2022