www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21000] New: -preview=nosharedaccess precludes use of


          Issue ID: 21000
           Summary: -preview=nosharedaccess precludes use of
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Other
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bcarneal11 gmail.com

import std.stdio;

void main() { writeln("Hello world!");

Compilation of the above with -preview=nosharedaccess fails.  The three error
messages, one each for stdin, stdout and stderr, look like this:

/dlang/dmd/linux/bin64/../../src/phobos/std/stdio.d-mixin-4841(4841): Error:
direct access to shared stdin is not allowed, see core.atomic

In the current stdio.d, the offending mixin is at line 4858 within the property
template named "makeGlobal".

The fix may be as simple as a cast at that location.

Jul 01 2020