http://d.puremagic.com/issues/show_bug.cgi?id=7184

           Summary: parse error on *(x)++
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-12-29 16:27:58 PST ---
void main(){
    int[2] y;
    int *x = y.ptr;
    *(x)++=0;
}

Error: expression expected, not '='
Error: C style cast illegal, use cast(x)++0
Error: found '0' when expecting ';' following statement

The code should compile.




Workaround if parentheses are a result of code generation:

void main(){
    int[2] y;
    int *x = y.ptr;
    *(*&x)++=0;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to