aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVolker Reichelt <v.reichelt@netcologne.de>2017-06-01 08:10:24 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2017-06-01 08:10:24 +0000
commit3fa4634c9250a7e0c51c1eac04d98b2fae032c60 (patch)
tree802df2b83f90dba82c40f3a7a362c86ec48ea648 /gcc
parent48932682a54f1a4a97fd8fc026f2d816519fdb7a (diff)
downloadgcc-3fa4634c9250a7e0c51c1eac04d98b2fae032c60.zip
gcc-3fa4634c9250a7e0c51c1eac04d98b2fae032c60.tar.gz
gcc-3fa4634c9250a7e0c51c1eac04d98b2fae032c60.tar.bz2
c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
* c.opt (Wcatch-value): New shortcut for Wcatch-value=1. (Wcatch-value=1): Enable by -Wall. * doc/invoke.texi (-Wcatch-value): Document new shortcut. Add to -Wall section. From-SVN: r248772
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c.opt6
-rw-r--r--gcc/doc/invoke.texi18
4 files changed, 26 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d80f59..b24b239 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * doc/invoke.texi (-Wcatch-value): Document new shortcut.
+ Add to -Wall section.
+
2017-06-01 Richard Biener <rguenther@suse.de>
PR middle-end/66313
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index a077867..8e163cd 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
+ (Wcatch-value=1): Enable by -Wall.
+
2017-05-30 David Malcolm <dmalcolm@redhat.com>
* c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index c3eca4ac..a8543de 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -388,8 +388,12 @@ Wcast-qual
C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
Warn about casts which discard qualifiers.
+Wcatch-value
+C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
+Warn about catch handlers of non-reference type.
+
Wcatch-value=
-C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger
+C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0)
Warn about catch handlers of non-reference type.
Wchar-subscripts
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 20805df8..59563aa 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -266,8 +266,8 @@ Objective-C and Objective-C++ Dialects}.
-Wno-builtin-declaration-mismatch @gol
-Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol
-Wc++-compat -Wc++11-compat -Wc++14-compat -Wcast-align -Wcast-qual @gol
--Wchar-subscripts -Wchkp -Wcatch-value=@var{n} -Wclobbered -Wcomment @gol
--Wconditionally-supported @gol
+-Wchar-subscripts -Wchkp -Wcatch-value -Wcatch-value=@var{n} @gol
+-Wclobbered -Wcomment -Wconditionally-supported @gol
-Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol
-Wdelete-incomplete @gol
-Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init @gol
@@ -3804,6 +3804,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
-Wbool-compare @gol
-Wbool-operation @gol
-Wc++11-compat -Wc++14-compat @gol
+-Wcatch-value @r{(C++ and Objective-C++ only)} @gol
-Wchar-subscripts @gol
-Wcomment @gol
-Wduplicate-decl-specifier @r{(C and Objective-C only)} @gol
@@ -5881,13 +5882,16 @@ When compiling C++, warn about the deprecated conversion from string
literals to @code{char *}. This warning is enabled by default for C++
programs.
-@item -Wcatch-value=@var{n} @r{(C++ and Objective-C++ only)}
+@item -Wcatch-value
+@itemx -Wcatch-value=@var{n} @r{(C++ and Objective-C++ only)}
@opindex Wcatch-value
+@opindex Wno-catch-value
Warn about catch handlers that do not catch via reference.
-With @option{-Wcatch-value=1} warn about polymorphic class types that
-are caught by value. With @option{-Wcatch-value=2} warn about all class
-types that are caught by value. With @option{-Wcatch-value=3} warn about
-all types that are not caught by reference.
+With @option{-Wcatch-value=1} (or @option{-Wcatch-value} for short)
+warn about polymorphic class types that are caught by value.
+With @option{-Wcatch-value=2} warn about all class types that are caught
+by value. With @option{-Wcatch-value=3} warn about all types that are
+not caught by reference. @option{-Wcatch-value} is enabled by @option{-Wall}.
@item -Wclobbered
@opindex Wclobbered