Add -Wmisleading-indentation to -Wall

gcc/c-family/ChangeLog:
	* c.opt (Wmisleading-indentation): Add to -Wall for C and C++.

gcc/ChangeLog:
	* doc/invoke.texi (-Wall): Add -Wmisleading-indentation to the
	list.
	(-Wmisleading-indentation): Update documentation to reflect
	being enabled by -Wall in C/C++.

From-SVN: r231539
This commit is contained in:
David Malcolm 2015-12-10 18:21:00 +00:00 committed by David Malcolm
parent 684ffdc9af
commit f6069ccc2b
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* doc/invoke.texi (-Wall): Add -Wmisleading-indentation to the
list.
(-Wmisleading-indentation): Update documentation to reflect
being enabled by -Wall in C/C++.
2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/68691

View File

@ -1,3 +1,7 @@
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2015-12-08 Jakub Jelinek <jakub@redhat.com>
PR c/48088

View File

@ -562,7 +562,7 @@ C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC
Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
Wmisleading-indentation
C C++ Common Var(warn_misleading_indentation) Warning
C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
Warn when the indentation of the code does not reflect the block structure.
Wmissing-braces

View File

@ -3556,6 +3556,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
-Wmaybe-uninitialized @gol
-Wmemset-transposed-args @gol
-Wmisleading-indentation @r{(only for C/C++)} @gol
-Wmissing-braces @r{(only for C/ObjC)} @gol
-Wnarrowing @r{(only for C++)} @gol
-Wnonnull @gol
@ -3903,8 +3904,6 @@ Specifically, a warning is issued for @code{if}, @code{else}, @code{while}, and
@code{for} clauses with a guarded statement that does not use braces,
followed by an unguarded statement with the same indentation.
This warning is disabled by default.
In the following example, the call to ``bar'' is misleadingly indented as
if it were guarded by the ``if'' conditional.
@ -3934,6 +3933,8 @@ The warning is not issued after a @code{#line} directive, since this
typically indicates autogenerated code, and no assumptions can be made
about the layout of the file that the directive references.
This warning is enabled by @option{-Wall} in C and C++.
@item -Wmissing-braces
@opindex Wmissing-braces
@opindex Wno-missing-braces