[Issue 13003] New: Lack of read-modify-write operation check on shared object field

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 28 20:29:32 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13003

          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 at puremagic.com
          Reporter: k.hara.pg at 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
}

--


More information about the Digitalmars-d-bugs mailing list