aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-12-10 18:21:00 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-12-10 18:21:00 +0000
commitf6069ccc2b4a6d02ae3f51119a6471a3b11b2119 (patch)
tree44a3849120e928bfe0879c266d66f5c6bc16868b /gcc
parent684ffdc9af5298cf63c26697d4a4df7688e9e09b (diff)
downloadgcc-f6069ccc2b4a6d02ae3f51119a6471a3b11b2119.zip
gcc-f6069ccc2b4a6d02ae3f51119a6471a3b11b2119.tar.gz
gcc-f6069ccc2b4a6d02ae3f51119a6471a3b11b2119.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c.opt2
-rw-r--r--gcc/doc/invoke.texi5
4 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c8522dd..eabb30d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 18ec7a1..0c8e74f 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -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
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 6531d3a..5867de5 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3f87429..20a19e3 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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