Lets not go into how stupid that is. Yes, things changed between K&R
editions 1 and 2, in a misguided attempt to make things less "surprising" the
drafters just introduced additional confusion.
> And THIS is one example of why it gets complicated.
>
> The C logic for type expansion is just a tad too easy to get wrong, and
> the strict type-checking you normally have with well-written ANSI C simply
> does not exist for integer types. The compiler will silently just do the
> promotion..
>
> Somebody mentioned -Wsign-compare. Try it with the example above. It won't
> warn at all, exactly because under C both sides of such a compare have the
> _same_ sign, even if one is a "unsigned char", and the other is a "signed
> int".
>
> Try it yourself if you don't believe me.
>
> Please guys. The issue of sign in comparisons are a LOT more complicated
> than most of you seem to think.
More than anything, it shows that education is needed, not macro patch-ups.
We have exactly the same issues with < and >, should we introduce
three-argument macros to replace them?
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/