Bug 423 – dmd ignores empty commandline arguments

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-10T00:48:00Z
Last change time
2014-02-15T13:22:06Z
Assigned to
bugzilla
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2006-10-10T00:48:05Z
dmd "" a.d is interpreted as >dmd a.d< dmd '' is interpteted as >dmd<
Comment #1 by hasan.aljudy — 2006-10-10T17:50:16Z
Derek Parnell wrote: > On Tue, 10 Oct 2006 01:39:01 -0700, Walter Bright wrote: > >> [email protected] wrote: >>> http://d.puremagic.com/issues/show_bug.cgi?id=423 >>> >>> Summary: dmd ignores empty commandline arguments >>> Product: D >>> Version: 0.169 >>> Platform: PC >>> OS/Version: Linux >>> Status: NEW >>> Severity: normal >>> Priority: P2 >>> Component: DMD >>> AssignedTo: [email protected] >>> ReportedBy: [email protected] >>> >>> dmd "" a.d >>> is interpreted as >dmd a.d< >>> >>> dmd '' >>> is interpteted as >dmd< >> That's what it's supposed to do. > > Why? I would have expected a string of length zero to be passed. > So? It's zero-length string is "nothing", hence ignored.
Comment #2 by thomas-dloop — 2006-10-11T15:40:26Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Walter Bright schrieb am 2006-10-11: > Derek Parnell wrote: >> The strings on a command line contain information even if one of them is >> empty - at the very least it is a placeholder. > > We could argue this till the cows come home. But the current behavior: > > 1) Is a result of the Digital Mars C startup code > 2) It's been that way for 20+ years > 3) It's embedded into every DM tool and every command line program > created with DM Please document this behaviour(http://www.digitalmars.com/d/dcompiler.html). > Nobody has ever complained about it or even commented on it before. I > doubt anyone has noticed it - I certainly haven't, and I've used this > stuff probably more than anyone <g>. > > Linux, however, does behave the way you suggest - at least the default > shell I use does it that way. On the other hand, I've never seen any > linux utility that made any mention in its documentation about having > any meaning assigned to blank arguments. Trying it on a few just gives > errors. > > In other words, I don't think it's worth arguing about or changing. The Linux Way is very nice for locating scripting bugs: dmd "${SOURCE_1}" "${SPURCE_2}" Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFLWIVLK5blCcjpWoRApSxAJoCdkJ/hpeJxrjvNm9NN8uzTGtLAQCgno4+ o6BocvVDeMNBUHHK3YeXrZA= =abZh -----END PGP SIGNATURE-----
Comment #3 by hasan.aljudy — 2006-10-12T14:00:23Z
Thomas Kuehne wrote: > The Linux Way is very nice for locating scripting bugs: > > dmd "${SOURCE_1}" "${SPURCE_2}" > > Thomas > Hmm, so does it have anything to do with a bug in dbuild, Derek?
Comment #4 by bugzilla — 2008-06-25T18:54:59Z
I'll add a note to dcompiler.html
Comment #5 by bugzilla — 2008-07-09T22:32:46Z
Fixed dmd 1.032 and 2.016