This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20968] Spurious "may be used uninitialized" warning
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2005 17:47:20 -0000
- Subject: [Bug middle-end/20968] Spurious "may be used uninitialized" warning
- References: <bug-20968-10415@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from law at redhat dot com 2005-11-08 17:47 -------
Just an interesting tidbit.
This testcase exposes a much more difficult/interesting long term problem.
Namely, how should we handle uninitialized warnings for variables which are
exposed by optimization.
ie, in this case (and probably others), we have a local variable which has had
its address taken, which normally suppresses uninitialized warnings. However,
inlining followed by our SSA optimizers proves that we don't need the address
of the local variable. That in turn exposes the local variable and we want to
be able to warn about it if its uninitialized.
Similar issues probably exist for SRA optimizations. Whee fun.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20968