[Issue 7184] New: parse error on *(x)++

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 29 16:27:59 PST 2011


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: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at 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: -------


More information about the Digitalmars-d-bugs mailing list