diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2006-01-22 02:38:03 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2006-01-22 02:38:03 +0000 |
commit | efee9ded41e6e5daa56ad1fc5f89b8825cc862ce (patch) | |
tree | b474b647fbee95d088cc14d5e28833c22edaffb0 | |
parent | 0e686aa6f7af3db2a7fc3a8f988d14d4e75282f4 (diff) | |
download | gcc-efee9ded41e6e5daa56ad1fc5f89b8825cc862ce.zip gcc-efee9ded41e6e5daa56ad1fc5f89b8825cc862ce.tar.gz gcc-efee9ded41e6e5daa56ad1fc5f89b8825cc862ce.tar.bz2 |
re PR c++/16190 (-Wnon-virtual-dtor, in -Wall, silenced only by pessimizing code)
PR c++/16190
* c-opts.c (c_common_handle_option): Don't include
-Wnon-virtual-dtor in -Wall; enable if -Weffc++.
* doc/invoke.texi (C++ Dialect Options): Document that
-Wnon-virtual-dtor is no longer included in -Wall.
From-SVN: r110085
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/c-opts.c | 7 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 986d4d2..a179140 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2006-01-21 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PR c++/16190 + * c-opts.c (c_common_handle_option): Don't include + -Wnon-virtual-dtor in -Wall; enable if -Weffc++. + * doc/invoke.texi (C++ Dialect Options): Document that + -Wnon-virtual-dtor is no longer included in -Wall. + 2006-01-21 Joseph S. Myers <joseph@codesourcery.com> * gcov.c (print_version), gcov-dump.c (print_version), diff --git a/gcc/c-opts.c b/gcc/c-opts.c index f508e4e..5bc5f5d 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -409,7 +409,6 @@ c_common_handle_option (size_t scode, const char *arg, int value) else { /* C++-specific warnings. */ - warn_nonvdtor = value; warn_reorder = value; warn_nontemplate_friend = value; } @@ -539,6 +538,12 @@ c_common_handle_option (size_t scode, const char *arg, int value) warn_write_strings = value; break; + case OPT_Weffc__: + warn_ecpp = value; + if (value) + warn_nonvdtor = true; + break; + case OPT_ansi: if (!c_dialect_cxx ()) set_std_c89 (false, true); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 1e5a216..0d0c521 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1736,8 +1736,8 @@ public static member functions. @item -Wnon-virtual-dtor @r{(C++ only)} @opindex Wnon-virtual-dtor Warn when a class appears to be polymorphic, thereby requiring a virtual -destructor, yet it declares a non-virtual one. -This warning is enabled by @option{-Wall}. +destructor, yet it declares a non-virtual one. This warning is also +enabled if -Weffc++ is specified. @item -Wreorder @r{(C++ only)} @opindex Wreorder |