Bug 845 – dmd -run does not correctly pass command line arguments

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-01-13T11:08:00Z
Last change time
2017-04-26T01:01:04Z
Assigned to
lio+bugzilla
Creator
lio+bugzilla

Comments

Comment #0 by lio+bugzilla — 2007-01-13T11:08:02Z
The following test cases: %1 "2nd\" 3rd %1 2nd\" 3rd %1 "2nd\"" 3rd %1 2nd\"" 3rd %1 "2nd\""" 3rd result in different arguments passed to main: import std.stdio; void main(char[]args[]) { foreach(a;args[1..$]) writefln(a); } Results, commas used as new-line: dmd -run: 2 args: 2nd,3rd 1 arg: 2nd 3rd 1 arg: 2nd 3rd 2 args: 2nd,3rd 2 args: 2nd,3rd (notice how all quotes are gone) First dmd, then run: 1 arg: 2nd" 3rd 2 args: 2nd",3rd 2 args: 2nd",3rd 1 arg: 2nd" 3rd 1 arg: 2nd" 3rd For the record, the last test case %1 "2nd\""" 3rd results in different arguments for dmd(dmc) and msvc7 and msvc8. dmd/dmc, 1 arg: 2nd" 3rd msvc7, 2 args: 2nd"",3rd msvc8, 1 arg: 2nd"" 3rd
Comment #1 by lio+bugzilla — 2017-04-26T01:01:04Z
I can no longer repro this with latest dmd, windows 10