aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-02-17 23:45:54 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-02-17 23:45:54 +0000
commit3747f3dc7290394aa6c0786763fc16efda0956cc (patch)
treefd40bde02db78dc707e07db90837e915d789ea96 /gcc
parentd9579a59fdd14361cda948c5c5490542e1372317 (diff)
downloadgcc-3747f3dc7290394aa6c0786763fc16efda0956cc.zip
gcc-3747f3dc7290394aa6c0786763fc16efda0956cc.tar.gz
gcc-3747f3dc7290394aa6c0786763fc16efda0956cc.tar.bz2
* invoke.texi (-Woverloaded-virtual): Clarify documentation.
From-SVN: r39807
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/invoke.texi29
2 files changed, 26 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d24594b..1fcd3a6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-17 Mark Mitchell <mark@codesourcery.com>
+
+ * invoke.texi (-Woverloaded-virtual): Clarify documentation.
+
2001-02-17 Richard Henderson <rth@redhat.com>
* reload1.c (reload_cse_simplify_set): Respect LOAD_EXTEND_OP
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index 302f97a..a6c67b0 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -1480,13 +1480,28 @@ new-style casts (@samp{static_cast}, @samp{reinterpret_cast}, and
@item -Woverloaded-virtual (C++ only)
@cindex overloaded virtual fn, warning
@cindex warning for overloaded virtual fn
-Warn when a derived class function declaration may be an error in
-defining a virtual function. In a derived class, the
-definitions of virtual functions must match the type signature of a
-virtual function declared in the base class. With this option, the
-compiler warns when you define a function with the same name as a
-virtual function, but with a type signature that does not match any
-declarations from the base class.
+Warn when a function declaration hides virtual functions from a
+base class. For example, in:
+
+@smallexample
+struct A @{
+ virtual void f();
+@};
+
+struct B: public A @{
+ void f(int);
+@};
+@end smallexample
+
+the @code{A} class version of @code{f} is hidden in @code{B}, and code
+like this:
+
+@smallexample
+B* b;
+b->f();
+@end smallexample
+
+will fail to compile.
@item -Wno-pmf-conversions (C++ only)
Disable the diagnostic for converting a bound pointer to member function