This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.4 PATCH: Fix Tru64 UNIX bootstrap failure in cp/decl.c
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 29 Jul 2003 23:07:21 +0200 (MEST)
- Subject: 3.4 PATCH: Fix Tru64 UNIX bootstrap failure in cp/decl.c
Mark,
this patch
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11667
* call.c (standard_conversion): Allow all integral->enumeral
conversions, after marking them as bad.
* decl.c (finish_enum): Make sure that all enumerators are
properly converted to the underlying type.
[...]
broke bootstrap on alpha-dec-osf4.0f/osf5.1:
/vol/gnu/src/gcc/gcc-dist/gcc/cp/decl.c: In function `finish_enum':
/vol/gnu/src/gcc/gcc-dist/gcc/cp/decl.c:13046: warning: 'underlying_type' might be used uninitialized in this function
The following patch gets me past this point.
Ok for mainline if it passes?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Tue Jul 29 20:30:39 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* decl.c (finish_enum): Initialize underlying_type.
Index: gcc/cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1104
diff -u -p -r1.1104 decl.c
--- gcc/cp/decl.c 29 Jul 2003 11:16:45 -0000 1.1104
+++ gcc/cp/decl.c 29 Jul 2003 21:05:28 -0000
@@ -13043,7 +13043,7 @@ finish_enum (tree enumtype)
int highprec;
int precision;
integer_type_kind itk;
- tree underlying_type;
+ tree underlying_type = NULL_TREE;
/* We built up the VALUES in reverse order. */
TYPE_VALUES (enumtype) = nreverse (TYPE_VALUES (enumtype));