re PR c/81417 (-Wsign-compare should print types being compared)
authorMarek Polacek <polacek@redhat.com>
Thu, 27 Jul 2017 15:02:17 +0000 (15:02 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 27 Jul 2017 15:02:17 +0000 (15:02 +0000)
commit06bd22f6099abe4fec73c988daf4cacd68f34329
treee482b25a9f983a087d053bd784ba65584a344020
parent27c8b49bfc23b658bc8ea90e653f76e26e856c43
re PR c/81417 (-Wsign-compare should print types being compared)

PR c/81417
* c-warn.c (warn_for_sign_compare): Tweak the warning message.  Print
the types.

* c-c++-common/Wsign-compare-1.c: New test.
* g++.dg/warn/Wsign-compare-2.C: Update dg-warning.
* g++.dg/warn/Wsign-compare-4.C: Likewise.
* g++.dg/warn/Wsign-compare-6.C: Likewise.
* g++.dg/warn/compare1.C: Likewise.
* gcc.dg/compare1.c: Likewise.
* gcc.dg/compare2.c: Likewise.
* gcc.dg/compare4.c: Likewise.
* gcc.dg/compare5.c: Likewise.
* gcc.dg/pr35430.c: Likewise.
* gcc.dg/pr60087.c: Likewise.

From-SVN: r250630
14 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wsign-compare-1.c [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wsign-compare-2.C
gcc/testsuite/g++.dg/warn/Wsign-compare-4.C
gcc/testsuite/g++.dg/warn/Wsign-compare-6.C
gcc/testsuite/g++.dg/warn/compare1.C
gcc/testsuite/gcc.dg/compare1.c
gcc/testsuite/gcc.dg/compare2.c
gcc/testsuite/gcc.dg/compare4.c
gcc/testsuite/gcc.dg/compare5.c
gcc/testsuite/gcc.dg/pr35430.c
gcc/testsuite/gcc.dg/pr60087.c