+2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * doc/invoke.texi (-Wshadow=global, -Wshadow=local,
+ -Wshadow=compatible-local): Fix description.
+ Add an example where -Wshadow=compatible-local does not
+ warn.
+
2019-10-03 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.h (MAX_PCREL17F_OFFSET): Adjust.
Objective-C method.
@item -Wshadow=global
-@opindex Wshadow=local
+@opindex Wshadow=global
The default for @option{-Wshadow}. Warns for any (global) shadowing.
+This warning is enabled by @option{-Wshadow=global}.
@item -Wshadow=local
@opindex Wshadow=local
Warn when a local variable shadows another local variable or parameter.
-This warning is enabled by @option{-Wshadow=global}.
+This warning is enabled by @option{-Wshadow=local}.
@item -Wshadow=compatible-local
@opindex Wshadow=compatible-local
warning. So not warning (about shadowing) in this case will not lead to
undetected bugs. Use of this flag instead of @option{-Wshadow=local} can
possibly reduce the number of warnings triggered by intentional shadowing.
+Note that this does also mean that shadowing @code{const char *i} by
+@code{char *i} will not emit a warning.
-This warning is enabled by @option{-Wshadow=local}.
+This warning is enabled by @option{-Wshadow=compatible-local}.
@item -Wlarger-than=@var{byte-size}
@opindex Wlarger-than=