is this intended behavior?

John Demme me at teqdruid.com
Mon Apr 9 13:03:04 PDT 2007


unknown wrote:

> Frank Malone Wrote:
>>         writefln(c < a ? "true" : "false"); // outputs false
> 
> From the documentation:
>> It is an error to have one operand be signed and the other unsigned
>> for a <, <=, > or >= expression. Use casts to make both operands
>> signed or both operands unsigned.
> 
> Please read the documentation or post to the learn forum. thx.
> 
> unknown []

In all fairness, DMD should catch it at compile time and throw an error.  It
doesn't even spit out a warning.  I'd consider this a bug- the code
shouldn't compile, or at least a warning should be issued.

-- 
~John Demme
me at teqdruid.com
http://www.teqdruid.com/



More information about the Digitalmars-d mailing list