george.burgess.iv added a comment. > C89 has no bool type and no stdbool.h but it has been added to later > standards? That means the generalization could theoretically be done for > later C standards, because we could check if the bool typedef had been used? > If yes, would the check benefit?
Sure, and we do complain about `x == -1` if the type of `x` is `_Bool`, but the type of `x == y` appears to be an `int` in all of {c89, c99, c11}: https://godbolt.org/g/BciGZT :) https://reviews.llvm.org/D45059 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits