]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/ChangeLog
-Wtautological-compare: fix comparison of macro expansions
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 20 Dec 2018 14:18:48 +0000 (14:18 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 20 Dec 2018 14:18:48 +0000 (14:18 +0000)
commit573767d4d2cbea5ba5c6de753455055fe4de355d
tree299ef323018ddbe9a66484111699585cbff65fa4
parent49fb2968516474bf2d825b62933e2ddcdef2c296
-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.

From-SVN: r267299
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wtautological-compare-8.c [new file with mode: 0644]