This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36296] wrong warning about potential uninitialized variable
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2008 10:21:07 -0000
- Subject: [Bug middle-end/36296] wrong warning about potential uninitialized variable
- References: <bug-36296-16207@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-05-22 10:21 -------
A way to tell gcc a variable is not uninitialized is to perform
self-initialization like
int i = i;
this will cause no code generation but inhibits the warning. Other compilers
may warn about this construct of course.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36296