Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 12, 2003 "cannot implicitly convert uint to int" | ||||
---|---|---|---|---|
| ||||
That's the error message the dmd compiler give me when I import windows.d : line 999: const int MAXDWORD = (0xFFFFFFFF); is there a bug with hexadecimal numbers ? before i install 0.66, this error never occurs. Please help me ! |
June 12, 2003 Re: "cannot implicitly convert uint to int" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sam |
Sam wrote:
>
> That's the error message the dmd compiler give me
> when I import windows.d :
>
> line 999: const int MAXDWORD = (0xFFFFFFFF);
>
> is there a bug with hexadecimal numbers ?
>
> before i install 0.66, this error never occurs. Please help me !
The line should read
const int MAXDWORD = (int)(0xFFFFFFFF);
I think the compiler got this "feature" in version 0.61
A revised windows.d file was posted by someone here in the newsgroup (there weree about hundred lines that had to be changed)
If you don't find it easily, I can send you a copy.
--
Helmut Leitner leitner@hls.via.at Graz, Austria www.hls-software.com
|
June 13, 2003 Re: | ||||
---|---|---|---|---|
| ||||
Posted in reply to Helmut Leitner | >>
>> before i install 0.66, this error never occurs. Please help me !
>
>The line should read
> const int MAXDWORD = (int)(0xFFFFFFFF);
>
>I think the compiler got this "feature" in version 0.61
DWORD = 32 bit unsigned int
|
June 13, 2003 Re: | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mark T | Mark T wrote: > > >> > >> before i install 0.66, this error never occurs. Please help me ! > > > >The line should read > > const int MAXDWORD = (int)(0xFFFFFFFF); > > > >I think the compiler got this "feature" in version 0.61 > > DWORD = 32 bit unsigned int Yes, but I think that a compiler might alternatively interpret 0xFFFFFFFF as "bit pattern" constant in this context (in fact we do). -- Helmut Leitner leitner@hls.via.at Graz, Austria www.hls-software.com |
June 13, 2003 Re: uint to (int) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Helmut Leitner | >Sam wrote:
>>
>> That's the error message the dmd compiler give me
>> when I import windows.d :
>>
>> line 999: const int MAXDWORD = (0xFFFFFFFF);
>>
>> is there a bug with hexadecimal numbers ?
>>
>> before i install 0.66, this error never occurs. Please help me !
>
>The line should read
> const int MAXDWORD = (int)(0xFFFFFFFF);
>
>I think the compiler got this "feature" in version 0.61
>
>A revised windows.d file was posted by someone here in the newsgroup (there weree about hundred lines that had to be changed)
>
>If you don't find it easily, I can send you a copy
I tried to cast the hexadecimal number to (int) but it doesn't work either the only way to compile is to change "const int" into "const uint"
i'm interested to this version of windows.d you were talking about ( i tried but
can't find it in the newsgroup ) could you please EMail it to me ?
thanx in advance.
|
June 13, 2003 Re: Re: | ||||
---|---|---|---|---|
| ||||
Posted in reply to Helmut Leitner | Helmut Leitner wrote:
> Mark T wrote:
>>
>>>>
>>>> before i install 0.66, this error never occurs. Please help me !
>>>
>>> The line should read
>>> const int MAXDWORD = (int)(0xFFFFFFFF);
>>>
>>> I think the compiler got this "feature" in version 0.61
>>
>> DWORD = 32 bit unsigned int
>
> Yes, but I think that a compiler might alternatively interpret
> 0xFFFFFFFF
> as "bit pattern" constant in this context (in fact we do).
I rather think his point was that the constant should be uint, not int :)
-fg
|
Copyright © 1999-2021 by the D Language Foundation