www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22068] New: importC: cast-expression accepted as lvalue in


          Issue ID: 22068
           Summary: importC: cast-expression accepted as lvalue in
           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:

The grammar is:
    ++ 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