Citerar Al Viro <viro@xxxxxxxxxxxxxxxx>: > On Wed, Jul 18, 2007 at 03:43:39AM +0200, ricknu-0@xxxxxxxxxxxxxx wrote: > > Good morning to you all! > > > > As most of you do not know, I am on Google's SoC > > > <http://code.google.com/soc/2007/sparse/appinfo.html?csaid=CB0974F67B64AD0C> > to > > add the ability to suggestions when booleans could/should be used. > > Er... Of _course_ booleans are values. And yes, you can say true + false. > Guaranteed to evaluate to int, value of expression being 1. It's perfectly > correct C99. Same as true + true is guaranteed to be 2 (int, again); > assigning > that to _Bool variable is guaranteed to give 1, aka true (see the rules > for conversion to _Bool). Can you really say it really is a value? With C definition: ex an positiv integer value => 'true' => value not zero, if converted from integer to boolean and back. A value would return a specific value on the secound step, right? > > Now, sparse handling of _Bool sucks in quite a few places (e.g. conversion > to it is not reduction modulo 2, it's comparison with 0), but I wonder if > that's what you have in mind... My main goal is to make it able to find possible places where an integer is used as an boolean. Richard Knutsson PS Believe I used "Reply" instead of "Reply all" when I answeared your other mail. So if you won't reply to any, could you please forward a copy to the list? Thanks. - To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html