(while bit still exists) is this implicit cast intentional or a compiler bug?
John Stoneham
captnjameskirk at moc.oohay
Mon Feb 20 08:32:09 PST 2006
bit notme(bit B) { return !B; }
Using the -w switch, the compiler says that the expression (!B) is of
type int and is implicitly converted to bit.
Using "~B" instead won't raise the warning, since "~" is a bitwise
operator as opposed to the logical "!" operator. But if bit is being
supported as a boolean type with logical true/false values, "!B"
shouldn't cause a conversion to int, should it?
More information about the Digitalmars-d
mailing list