www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12859] New: Read-modify-write operation for shared variable

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

          Issue ID: 12859
           Summary: Read-modify-write operation for shared variable in
                    Phobos
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: bearophile_hugs eml.cc

void main() {
    import std.stdio;
    writeln(0);
}



The latest dmd 2.066alpha gives:

dmd -inline test.d

...\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(709): Deprecation:
Read-modify-write operations are not allowed for shared variables. Use
core.atomic.atomicOp!"&="(__fhnd_info[cast(uint)fd], ~FHND_TEXT) instead.


Why aren't automatic tests catching this problem?

--
Jun 05 2014