This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This fixes a bug reported by Andrew Pinksi. http://gcc.gnu.org/ml/gcc/2008-03/msg01058.html We are getting a warning during the bootstrap while compiling pt.c. This is supposed to be an error, but for another bug in the enable checking code. Anyways, we have to fix this before we can fix the enable checking code. ../../gcc/gcc/cp/pt.c: In function âtsubst_copyâ: ../../gcc/gcc/cp/pt.c:9919: warning: âlenâ may be used uninitialized in this function This bug was introduced by a patch from Doug Gregor. http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01675.html As best as I can tell, there are 3 possible return values from the tsubst_pack_expansion call: error_mark_node, a TREE_VEC, or a PACK_EXPANSION. Hence the code is OK, gcc just can't tell that len will always be set on the path where it is used. So I just checked in a patch to initialize len to zero to avoid the warning. This was tested with an ia64-linux C and C++ bootstrap and make check. There were no regressions, and I also verified that the warning was gone. Jim
Attachment:
patch.tsubst_copy.len
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |