[Bug c/54554] Undetected use of uninitialized variable
dpapavas at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Sep 12 10:19:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54554
--- Comment #2 from Dimitris Papavasiliou <dpapavas at gmail dot com> 2012-09-12 10:19:20 UTC ---
Specifying -O does indeed produce a warning if i is not assigned a constant
value (for instance i = rand(); ). Omitting -O and specifying
-Wmaybe-uninitialized does not produce anything though. Does that mean that
warnings about possibly uninitialized variables are not supported at all, even
if explicitly requested by the user when not optimizing? If that is the case
then perhaps this should be documented in the manual. The latest version just
mentions this for -Wmaybe-uninitialized:
"This warning is enabled by -Wall or -Wextra."
More information about the Gcc-bugs
mailing list