http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772
--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-28 12:37:06 UTC --- (In reply to comment #11) > (In reply to comment #9) > > It forgets to check first whether the first 2 ranges are trivial. > > Or easier, instead of checking: > if (TREE_CODE (tem) != INTEGER_CST) > it could check integer_onep(tem) or integer_zerop(tem) depending on or_op. Do you mean: if (or_op && integer_onep(tem)) { warn();} else if (!or_op && integer_zerop(tem)) { warn();} I think that could work. Would you mind testing it?