www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6663] New: std.stdio conflicts with core.stdc.stdio

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6663

           Summary: std.stdio conflicts with core.stdc.stdio
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: jlquinn optonline.net



---
DMD 2.055 on Ubuntu x86_64.

Compile the following junk.d file:

import std.stdio;
import std.cstream;
void main(string[] argv) {
  derr.writef("CONTINUE ... \n");
  stdout.write("hi\n");
}


~/dmd2/linux/bin64/dmd junk.d
junk.d(5): Error: std.stdio.stdout at
/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(2192) conflicts
with core.stdc.stdio.stdout at
/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdio.di(264)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6663


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com



12:35:47 PDT ---
Why do you think this is a bug?

Solutions to your problem include selective imports (import std.cstream :
derr), or using disambiguation aliases (alias std.stdio.stdout stdout).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6663




---
I think it's an error because I should be able to use facilities from the
standard library without such conflict.

Note that I'm not asking for guarantees about how the streams are synchronized,
but it ought to compile and basically run.

Sorry, I don't accept that a D user should have to distinguish between 2 stdout
objects.  A lot of effort is going into improving Phobos to make it civilized. 
This isn't.

I do accept that std.stream is going to undergo a rework and that this issue
may just disappear as part of that, though :-)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6663




13:26:33 PDT ---
A comment from std.cstream:

* Both std.c.stdio and std.stream are publicly imported by std.cstream.

I suppose this makes *some* kind of sense, if you think of std.cstream as an
alternative, and not a complement, to std.stdio.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2011