www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7184] New: parse error on *(x)++


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

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

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;

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