Bug 12859 – Read-modify-write operation for shared variable in Phobos

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-06-05T21:39:00Z
Last change time
2014-07-04T19:22:37Z
Keywords
pull
Assigned to
nobody
Creator
bearophile_hugs
See also
https://issues.dlang.org/show_bug.cgi?id=13034

Comments

Comment #0 by bearophile_hugs — 2014-06-05T21:39:04Z
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?
Comment #1 by bearophile_hugs — 2014-06-26T23:05:49Z
Increased to regression.
Comment #2 by k.hara.pg — 2014-06-29T03:05:25Z
Comment #3 by github-bugzilla — 2014-06-29T12:53:18Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8ab7ceebd91d4459cdd04c6e63e84d8ef63610d0 fix Issue 12859 - Read-modify-write operation for shared variable in Phobos https://github.com/D-Programming-Language/phobos/commit/fe0a0dd37037fc43ad7edd5627b5d96eb9e0a140 Merge pull request #2281 from 9rnsr/fix12859 [REG2.066a] Issue 12859 - Read-modify-write operation for shared variable in Phobos
Comment #4 by github-bugzilla — 2014-06-30T02:53:43Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/6e9e153075e56ce6a8f1c86e3a8f7f2b0947dd53 Fix issue 12859 again The direct pushing by Andrew Edwards had accidentally reverted regression fix. https://github.com/D-Programming-Language/phobos/commit/0da863be79339b5f853a5ae7c530cfcf7e54c355 Merge pull request #2286 from 9rnsr/fix12859 Fix issue 12859 again
Comment #5 by bearophile_hugs — 2014-07-02T11:40:21Z
When I compile druntime I still see some errors: src\core\stdc\stdio.d(683): Deprecation: Read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"&="((*stream)._flag, ~_IOERR) instead. src\core\stdc\stdio.d(684): Deprecation: Read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"&="((*stream)._flag, ~(_IOERR | _IOEOF)) instead. dmd -c -oflib\gcstub.obj src\gcstub\gc.d -m32 -O -release -inline -w -Isrc -Iimport src\core\stdc\stdio.d(683): Deprecation: Read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"&="((*stream)._flag, ~_IOERR) instead. src\core\stdc\stdio.d(684): Deprecation: Read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"&="((*stream)._flag, ~(_IOERR | _IOEOF)) instead. Do I have to reopen this issue?
Comment #6 by gassa — 2014-07-03T19:55:44Z
64-bit Windows version also has six such warnings. Four of them involve postincrement & postdecrement, so they are a bit trickier.
Comment #7 by k.hara.pg — 2014-07-04T19:22:37Z
(In reply to bearophile_hugs from comment #5) > When I compile druntime I still see some errors: [snip] Issue 13034 is opened for that, so I close this.