[Issue 22068] New: importC: cast-expression accepted as lvalue in unary-expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 22 14:00:50 UTC 2021
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 at puremagic.com
Reporter: ibuclaw at 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.
--
More information about the Digitalmars-d-bugs
mailing list