On Mar 2, 2012, at 12:52 PM, Joerg Sonnenberger wrote: > > That's my point. Warning about char being checked for being < 0 can be > found a lot in portable code. It is not automatically tautological, so I > don't think it should trigger the check.
I don't think the code is "portable" in that case. If plain char is treated as unsigned (e.g., invoking clang with -funsigned-char or on platforms that treat plain char as unsigned), then the check (char < 0) is a tautological comparison that we should warn against --- the disabled check is almost always a logic bug. Portable code should use (signed char < 0). - xi _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
