PR c++/61945
* class.c (warn_hidden): Check for FUNCTION_DECL.
* g++.dg/warn/pr61945.C: New test.
From-SVN: r215597
+2014-09-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/61945
+ * class.c (warn_hidden): Check for FUNCTION_DECL.
+
2014-09-25 Jakub Jelinek <jakub@redhat.com>
PR c++/63249
for (fn = fns; fn; fn = OVL_NEXT (fn))
{
fndecl = OVL_CURRENT (fn);
- if (DECL_VINDEX (fndecl))
+ if (TREE_CODE (fndecl) == FUNCTION_DECL
+ && DECL_VINDEX (fndecl))
{
tree *prev = &base_fndecls;
+2014-09-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/61945
+ * g++.dg/warn/pr61945.C: New test.
+
2014-09-25 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/63341
--- /dev/null
+// PR c++/61945
+// { dg-do compile }
+// { dg-options "-Woverloaded-virtual" }
+
+class A {
+ virtual int foo (); // { dg-warning "was hidden" }
+};
+class B : A {
+ template <typename>
+ void foo (); // { dg-warning "by .B::foo\\(\\)." }
+};