www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18476] New: -run should not only take the next argument

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

          Issue ID: 18476
           Summary: -run should not only take the next argument
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

echo "void main(){}" | dmd -run -c -

and fails with

---
Error: module -c is in file '-c.d' which cannot be read
import path[0] = /usr/include/dlang/dmd
---

I have seen people at my Meetup struggling with this and I was initially also
puzzled.
One really needs to know the implementation of mars.d to understand this.

--
Feb 20 2018