www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22913] New: importC: array index expression parsed as cast


          Issue ID: 22913
           Summary: importC: array index expression parsed as cast
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi

void fn()
        int a[1];
        int b = (a[0]);

test.c(4): Error: expression expected, not `;`
test.c(5): Error: `=`, `;` or `,` expected to end declaration instead of `}`
test.c(6): Error: found `End of File` when expecting `}` following compound

new regression from https://github.com/dlang/dmd/pull/13850

Mar 23 2022