digitalmars.D.bugs - [Issue 22068] New: importC: cast-expression accepted as lvalue in
- d-bugmail puremagic.com (32/32) Jun 22 2021 https://issues.dlang.org/show_bug.cgi?id=22068
https://issues.dlang.org/show_bug.cgi?id=22068 Issue ID: 22068 Summary: importC: cast-expression accepted as lvalue in unary-expression Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ibuclaw gdcproject.org This isn't valid as per C11 6.5.3: --- ++(int)i; The grammar is: --- unary-expression: postfix-expression ++ unary-expression -- unary-expression unary-operator cast-expression sizeof unary-expression sizeof ( type-name ) _Alignof ( type-name ) --- Similar to issue 22067, except here the parser not implementing the grammar correctly bites us even harder. In the former issue, it's likely an going to be an error deferred to semantic. --
Jun 22 2021