Commit ca95ce80 by Vladislav Ivanishin Committed by Vladislav Ivanishin

[doc] -Wuninitialized doesn't do -Wclobbered's job

        * gcc/doc/invoke.texi (-Wuninitialized): Don't mention the clobbered by
        setjmp situation here.  Fix a verb's ending: "the exact variables or
        elements for which there are warnings depends" -> "... depend".

From-SVN: r276657
parent 19849d15
2019-10-07 Vladislav Ivanishin <vlad@ispras.ru>
* doc/invoke.texi (-Wuninitialized): Don't mention the clobbered by
setjmp situation here. Fix a verb's ending: "the exact variables or
elements for which there are warnings depends" -> "... depend".
2019-10-07 Aldy Hernandez <aldyh@redhat.com> 2019-10-07 Aldy Hernandez <aldyh@redhat.com>
* ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check.
......
...@@ -5578,21 +5578,20 @@ either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies ...@@ -5578,21 +5578,20 @@ either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies
@item -Wuninitialized @item -Wuninitialized
@opindex Wuninitialized @opindex Wuninitialized
@opindex Wno-uninitialized @opindex Wno-uninitialized
Warn if an automatic variable is used without first being initialized Warn if an automatic variable is used without first being initialized.
or if a variable may be clobbered by a @code{setjmp} call. In C++, In C++, warn if a non-static reference or non-static @code{const}
warn if a non-static reference or non-static @code{const} member member appears in a class without constructors.
appears in a class without constructors.
If you want to warn about code that uses the uninitialized value of the If you want to warn about code that uses the uninitialized value of the
variable in its own initializer, use the @option{-Winit-self} option. variable in its own initializer, use the @option{-Winit-self} option.
These warnings occur for individual uninitialized or clobbered These warnings occur for individual uninitialized elements of
elements of structure, union or array variables as well as for structure, union or array variables as well as for variables that are
variables that are uninitialized or clobbered as a whole. They do uninitialized as a whole. They do not occur for variables or elements
not occur for variables or elements declared @code{volatile}. Because declared @code{volatile}. Because these warnings depend on
these warnings depend on optimization, the exact variables or elements optimization, the exact variables or elements for which there are
for which there are warnings depends on the precise optimization warnings depend on the precise optimization options and version of GCC
options and version of GCC used. used.
Note that there may be no warning about a variable that is used only Note that there may be no warning about a variable that is used only
to compute a value that itself is never used, because such to compute a value that itself is never used, because such
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment