PR c++/91921 - stray warning with -Woverloaded-virtual.
authorMarek Polacek <polacek@redhat.com>
Sat, 28 Sep 2019 11:46:33 +0000 (11:46 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sat, 28 Sep 2019 11:46:33 +0000 (11:46 +0000)
commit7cf66a2dbe8017f59d2b28e8db3de8067efcc43e
treedb6e3f81bed0116523ac7648fb672b27ded21bd9
parent028c9b3be468a5dbd27e3190b14d60b04ea02ff4
PR c++/91921 - stray warning with -Woverloaded-virtual.

* class.c (warn_hidden): Only emit the second part of
-Woverloaded-virtual if the first part was issued.  Use inform instead
warning_at.

* g++.dg/warn/Woverloaded-2.C: New.
* g++.dg/warn/Woverloaded-2.h: New.
* g++.dg/warn/pr61945.C: Turn dg-warning into dg-message.
* g++.old-deja/g++.mike/warn6.C: Likewise.
* g++.old-deja/g++.warn/virt1.C: Likewise.

From-SVN: r276249
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Woverloaded-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Woverloaded-2.h [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/pr61945.C
gcc/testsuite/g++.old-deja/g++.mike/warn6.C
gcc/testsuite/g++.old-deja/g++.warn/virt1.C