www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22973] New: importC: sizeof with array and pointer access

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

          Issue ID: 22973
           Summary: importC: sizeof with array and pointer access gives
                    'array type has incomplete element type'
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi
                CC: duser neet.fi

int *ps[1];
_Static_assert(sizeof(ps[0][0]) == sizeof(int), "");

Error: array type has incomplete element type `ps[0]`

--
Apr 02 2022