https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67030
--- Comment #6 from ktkachov at gcc dot gnu.org --- (In reply to Marek Polacek from comment #4) > (In reply to ktkachov from comment #3) > > Actually, that helps. I bet the following works. Mind giving this one a > spin? Yes, that seems to work. Bootstrap proceeds from that point i.e. cfgexpand.c compiles. I have to go offline for the day, so I'll have the full bootstrap result tomorrow but from what I can see this is an obvious fix (to my limited C frontend experience) and it would be nice to have it in ASAP to fix arm bootstrap. Thanks for the quick response. > > --- a/gcc/c-family/c-common.c > +++ b/gcc/c-family/c-common.c > @@ -1890,6 +1890,11 @@ warn_tautological_cmp (location_t loc, enum tree_code > code, tree lhs, tree rhs) > if (TREE_CODE_CLASS (code) != tcc_comparison) > return; > > + if (from_macro_expansion_at (loc) > + || from_macro_expansion_at (EXPR_LOCATION (lhs)) > + || from_macro_expansion_at (EXPR_LOCATION (rhs))) > + return; > + > /* We do not warn for constants because they are typical of macro > expansions that test for features, sizeof, and similar. */ > if (CONSTANT_CLASS_P (lhs) || CONSTANT_CLASS_P (rhs))