Thread overview
DMD crashed because of "-version=Win32"
Dec 14, 2006
zhang
Dec 14, 2006
Stewart Gordon
Dec 18, 2006
heromyth
Dec 14, 2006
Justin C Calvarese
Dec 15, 2006
Stewart Gordon
Dec 18, 2006
heromyth
December 14, 2006
This cammand
    dmd -version=Win32 test.d
will raise a OS error.

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

Welcome to the art of reporting bugs.  Here are a few tips to get you started:

1. digitalmars.D.bugs is the correct newsgroup for bugs.  But even better is to report it using Bugzilla

http://d.puremagic.com/issues/

after checking that it isn't already filed there.

2. Don't just tell us that something gives an error, tell us _what the error is_!

3. Always indicate what operating system and what version of the compiler you are using.

4. Posting code samples can work wonders.  But avoid posting samples that are too long - minimal testcases work best.  See

http://homepage1.nifty.com/algafield/sscce.html

HAND

Stewart.
December 14, 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
December 14, 2006
Justin C Calvarese wrote:
> zhang wrote:
>> This cammand
>>     dmd -version=Win32 test.d
>> will raise a OS error.

> 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/.

It says "Error: version identifier 'Win32' is reserved and cannot be set". No need to change IMO.
December 15, 2006
Jari-Matti Mäkelä wrote:
> Justin C Calvarese wrote:
>> zhang wrote:
>>> This cammand
>>>     dmd -version=Win32 test.d
>>> will raise a OS error.
<snip>
> It says "Error: version identifier 'Win32' is reserved and cannot be
> set". No need to change IMO.

I'm guessing it's doing something else on the OP's OS, whatever that may be.

Stewart.
December 18, 2006
Stewart Gordon :
> zhang wrote:
>> This cammand
>>     dmd -version=Win32 test.d
>> will raise a OS error.
> 
> Welcome to the art of reporting bugs.  Here are a few tips to get you started:
> 
> 1. digitalmars.D.bugs is the correct newsgroup for bugs.  But even better is to report it using Bugzilla
> 
> http://d.puremagic.com/issues/
> 
> after checking that it isn't already filed there.
> 
> 2. Don't just tell us that something gives an error, tell us _what the error is_!
> 
> 3. Always indicate what operating system and what version of the compiler you are using.
> 
> 4. Posting code samples can work wonders.  But avoid posting samples that are too long - minimal testcases work best.  See
> 
> http://homepage1.nifty.com/algafield/sscce.html
> 
> HAND
> 
> Stewart.
Thanks for your hints.
I just want to know if someone has the same problem. If it is, I think I
can do something.
December 18, 2006
Justin C Calvarese :
> 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/
> 

At first, I havn't get ready to think it as a bug.

> 
> 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.
> 

Thanks.

> 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/.
> 

Thanks for what you have said, that is what I had wanted to say, but havn't because of my poor english exception.