www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13003] New: Lack of read-modify-write operation check on


          Issue ID: 13003
           Summary: Lack of read-modify-write operation check on shared
                    object field
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: k.hara.pg gmail.com

In git-head, issue 3672 is fixed, but its implementation is not enough.

Test case:

void main()
    shared int n;
    n++;    // deprecated RMW operation
    n *= 4; // deprecated RMW operation

    struct S { int var; }
    shared S s;
    s.var++;        // no deprecation
    s.var -= 2;     // no deprecation

Jun 28 2014