aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/class.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5f0490c..e324712 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+ * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
+
+2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
PR c/21438
* typeck.c (build_binary_op): Call warn_for_div_zero instead of
warning.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b39f532..22c9439 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2421,8 +2421,8 @@ warn_hidden (tree t)
while (base_fndecls)
{
/* Here we know it is a hider, and no overrider exists. */
- warning (0, "%q+D was hidden", TREE_VALUE (base_fndecls));
- warning (0, " by %q+D", fns);
+ warning (OPT_Woverloaded_virtual, "%q+D was hidden", TREE_VALUE (base_fndecls));
+ warning (OPT_Woverloaded_virtual, " by %q+D", fns);
base_fndecls = TREE_CHAIN (base_fndecls);
}
}