https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87504
--- Comment #8 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Author: dmalcolm Date: Thu Dec 20 14:18:48 2018 New Revision: 267299 URL: https://gcc.gnu.org/viewcvs?rev=267299&root=gcc&view=rev Log: -Wtautological-compare: fix comparison of macro expansions gcc/c-family/ChangeLog: PR c++/87504 * c-warn.c (get_outermost_macro_expansion): New function. (spelled_the_same_p): Use it to unwind the macro expansions, and compare the outermost macro in each nested expansion, rather than the innermost. gcc/testsuite/ChangeLog: PR c++/87504 * c-c++-common/Wtautological-compare-8.c: New test. Added: trunk/gcc/testsuite/c-c++-common/Wtautological-compare-8.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-warn.c trunk/gcc/testsuite/ChangeLog