DMD 1.010 release

Lionello Lunesu lio at lunesu.remove.com
Mon Mar 26 04:09:48 PDT 2007


Walter Bright wrote:
> Frits van Bommel wrote:
>> Walter Bright wrote:
>>> Bug fixes, some enhancements.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>>>
>>> http://ftp.digitalmars.com/dmd.1.010.zip
>>
>> Looking through the new stdio code:
>>
>> * Why aren't the internal DigitalMars/GCC stdio functions and their 
>> aliases private?
> 
> Sloth.
> 
>> * These lines:
>> ---
>> if ((c2 == FGETWC(fp)) != -1 ||
>>     c2 < 0xDC00 && c2 > 0xDFFF)
>> {
>>     StdioException("unpaired UTF-16 surrogate");
>> }
>> c = ((c - 0xD7C0) << 10) + (c2 - 0xDC00);
>> ---
>> (found twice in readln, both in DigitalMars and in GCC/Windows code) 
>> look suspicious to me, especially since I don't see any assignments to 
>> (or other use of) 'c2'. Is this a reverse "'=' vs '==' in an 
>> condition" bug?
> 
> Cripes, you're right. The '==' should be '='. Good catch!

This reminds of that discussion concerning comparison of booleans to 
integers ;)

L.



More information about the Digitalmars-d-announce mailing list