aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Wilson <wilson@tuliptree.org>2008-04-07 18:57:48 -0700
committerJim Wilson <wilson@gcc.gnu.org>2008-04-07 18:57:48 -0700
commite68c63e3800a7ff463fc0c41cd769569793fb53b (patch)
tree53ff872d8a6d28d7382a039c3adedbddf3db8d22
parent48b350ad556a97b8c213cb550e2a55f04fbbc387 (diff)
downloadgcc-e68c63e3800a7ff463fc0c41cd769569793fb53b.zip
gcc-e68c63e3800a7ff463fc0c41cd769569793fb53b.tar.gz
gcc-e68c63e3800a7ff463fc0c41cd769569793fb53b.tar.bz2
Fix uninit warning reported by Andrew Pinski.
pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len. From-SVN: r134001
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ee51b00..0b7fc4c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-07 James E. Wilson <wilson@tuliptree.org>
+
+ * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
+
2008-04-07 Jason Merrill <jason@redhat.com>
PR c++/35734
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 6954a1b..dc14fd2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -9916,7 +9916,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
/* We only want to compute the number of arguments. */
tree expanded = tsubst_pack_expansion (TREE_OPERAND (t, 0), args,
complain, in_decl);
- int len;
+ int len = 0;
if (TREE_CODE (expanded) == TREE_VEC)
len = TREE_VEC_LENGTH (expanded);