On Mon, Aug 29, 2011 at 12:01:06PM +0200, Jonathan Neuschäfer wrote: > On Sun, Aug 28, 2011 at 03:14:18PM +1200, Chris Forbes wrote: > > + case EXPR_BINOP: > > + case EXPR_COMMA: > > + case EXPR_COMPARE: > > + case EXPR_LOGICAL: > > + case EXPR_ASSIGNMENT: > > + return expr_equiv(lhs->left, rhs->left) && > > + expr_equiv(lhs->right, rhs->right); > [...] > > + if ((a == b) && (a == b)) /* should warn */ > > + bar(); > > + > > + if ((a == b) && (b == c)) /* should not warn */ > > + bar(); > > Should it maybe also handle cases like this? > > if ((a == b) && (b == a)) > bar(); That seems both significantly harder to handle and significantly less likely (since it won't occur due to simple copy/paste). Probably worth doing at some point, but I don't think a first pass needs to consider it. - Josh Triplett -- 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