This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17506] New: incorrect warning about non-existant variable
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2004 18:38:12 -0000
- Subject: [Bug tree-optimization/17506] New: incorrect warning about non-existant variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In patching cp/class.c I get the following error out of a bootstrap,
../../gcc/gcc/cp/class.c: In function `finish_struct_1':
../../gcc/gcc/tree.h:80: warning: 'ix' is used uninitialized in this function
*) tree.h:80 is a static inline function, which is called from finish_struct_1
*) finish_struct_1 nor that inline function have a variable called 'ix' (that I
can see).
I've attached a preprocessed source with all the #lines removed, and the
expansion of tree.h:80 split onto several lines for easy location. It has the
same problems, reporting
nathan@garibaldi:390>./cc1 -quiet -fdump-tree-all -Wall -W -g -O2 unused.i
unused.i: In function `finish_struct_1':
unused.i:4262: warning: 'ix' is used uninitialized in this function
line 4262 is ' if (vec_ && ix_ < vec_->num)' -- a distinct lack of 'ix'.
--
Summary: incorrect warning about non-existant variable
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nathan at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17506