DMD crashed because of "-version=Win32"

Justin C Calvarese technocrat7 at gmail.com
Thu Dec 14 08:54:54 PST 2006


zhang wrote:
> This cammand
>     dmd -version=Win32 test.d
> will raise a OS error. 
> 

Firstly, I want to reiterate what Stewart said: this isn't the proper 
newsgroup to report bugs. Either use digitalmars.D.bugs or 
http://d.puremagic.com/issues/

But that's okay. Accidents happen.

Also, I'm having a good day, so I'll you that what you're trying to 
isn't supposed to work and I'll tell you why.

Win32 is a predefined version identifier. There's a list of them on: 
http://www.digitalmars.com/d/version.html

That same page of the spec also tells us that "-version=Win32" is a 
valid switch:
"Furthermore, predefined version identifiers from this list cannot be 
set from the command line or from version statements. (This prevents 
things like both Windows and linux  being simultaneously set.)"

But even an invalid switch shouldn't crash the compiler or cause a blue 
screen on kernel panic or anything crazy like that. So if the invalid 
switch didn't just yield a helpful error message (such as "predefined 
version identifier 'Win32' can't be set at the command line"), then it 
would be good to file a detailed description of what caused the compiler 
to malfunction at http://d.puremagic.com/issues/.

(my reply is cross-posted to digitalmars.D.bugs)

-- 
jcc7



More information about the Digitalmars-d mailing list