summaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-11 23:19:06 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-11 23:19:06 +0000
commit126636026724ab5faecb017cfaf9dabbd3754ef3 (patch)
tree07eca0bd2785dbe7d4080d868f53c82033d3cef3 /gcc/common.opt
parent443a48423ecf5e1bebb20f2e2159448f43e33a23 (diff)
downloadgcc-126636026724ab5faecb017cfaf9dabbd3754ef3.tar.gz
gcc/
* common.opt (Wimplicit-fallthrough) Turn into alias to -Wimplicit-fallthrough=3. Remove EnabledBy. (Wimplicit-fallthrough=): New option. * gimplify.c (warn_implicit_fallthrough_r): Use OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough. * doc/invoke.texi (-Wimplicit-fallthrough): Document as alias to -Wimplicit-fallthrough=3. (-Wimplicit-fallthrough=): Document. gcc/c-family/ * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option. (Wimplicit-fallthrough=): Enable for these languages by -Wextra. * c-opts.c (sanitize_cpp_opts): Initialize cpp_opts->cpp_warn_implicit_fallthrough. gcc/testsuite/ * c-c++-common/Wimplicit-fallthrough-25.c: New test. * c-c++-common/Wimplicit-fallthrough-26.c: New test. * c-c++-common/Wimplicit-fallthrough-27.c: New test. * c-c++-common/Wimplicit-fallthrough-28.c: New test. * c-c++-common/Wimplicit-fallthrough-29.c: New test. * c-c++-common/Wimplicit-fallthrough-30.c: New test. * c-c++-common/Wimplicit-fallthrough-31.c: New test. * c-c++-common/Wimplicit-fallthrough-32.c: New test. * c-c++-common/Wimplicit-fallthrough-33.c: New test. libcpp/ * include/cpplib.h (struct cpp_options): Add cpp_warn_implicit_fallthrough. * init.c (cpp_create_reader): Initialize it to 0. * lex.c (fallthrough_comment_p): Handle different cpp_warn_implicit_fallthrough levels. Whitespace fixes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index 3425c19e514..15679c5d392 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -602,7 +602,10 @@ Common Var(warn_hsa) Init(1) Warning
Warn when a function cannot be expanded to HSAIL.
Wimplicit-fallthrough
-Common Var(warn_implicit_fallthrough) Warning EnabledBy(Wextra)
+Common Alias(Wimplicit-fallthrough=,3,0) Warning
+
+Wimplicit-fallthrough=
+Common Var(warn_implicit_fallthrough) RejectNegative Joined UInteger Warning
Warn when a switch case falls through.
Winline