This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/58236] -Wuninitialized doesn't report uninitialised variable as expected
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Aug 2013 07:35:12 +0000
- Subject: [Bug c/58236] -Wuninitialized doesn't report uninitialised variable as expected
- Auto-submitted: auto-generated
- References: <bug-58236-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58236
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Note, from the documentation of -Wuninitialized:
"Because these warnings depend on optimization, the exact variables or elements
for which there are warnings depends on the precise optimization options and
version of GCC used."
You need to pass -O2 on the command line, and then you'll get warnings.