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: "vincent at vinc17 dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2008 11:01:25 -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 #4 from vincent at vinc17 dot org 2008-05-22 11:01 -------
(In reply to comment #3)
> A way to tell gcc a variable is not uninitialized is to perform
> self-initialization like
>
> int i = i;
This doesn't seem to be valid C code.
> this will cause no code generation but inhibits the warning. Other compilers
> may warn about this construct of course.
Or worse, generate non-working code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36296