* 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. From-SVN: r241013
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| po | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| ChangeLog.jit | Loading commit data... | |
| Makefile.in | Loading commit data... | |
| aclocal.m4 | Loading commit data... | |
| charset.c | Loading commit data... | |
| config.in | Loading commit data... | |
| configure | Loading commit data... | |
| configure.ac | Loading commit data... | |
| directives-only.c | Loading commit data... | |
| directives.c | Loading commit data... | |
| errors.c | Loading commit data... | |
| expr.c | Loading commit data... | |
| files.c | Loading commit data... | |
| identifiers.c | Loading commit data... | |
| init.c | Loading commit data... | |
| internal.h | Loading commit data... | |
| lex.c | Loading commit data... | |
| line-map.c | Loading commit data... | |
| location-example.txt | Loading commit data... | |
| macro.c | Loading commit data... | |
| makeucnid.c | Loading commit data... | |
| mkdeps.c | Loading commit data... | |
| pch.c | Loading commit data... | |
| symtab.c | Loading commit data... | |
| system.h | Loading commit data... | |
| traditional.c | Loading commit data... | |
| ucnid.h | Loading commit data... | |
| ucnid.tab | Loading commit data... |