]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix uninit warning reported by Andrew Pinski.
authorJames E Wilson <wilson@tuliptree.org>
Tue, 8 Apr 2008 01:57:48 +0000 (18:57 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 8 Apr 2008 01:57:48 +0000 (18:57 -0700)
pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.

From-SVN: r134001

gcc/cp/ChangeLog
gcc/cp/pt.c

index ee51b005fee1c42b72508a98752b970db49e88cc..0b7fc4ccc84d42b1c6691a59c106cedd9eea88f9 100644 (file)
@@ -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
index 6954a1bee9ee1cd0866e446473f3e76c763b691f..dc14fd28c88473734c0454c88c65f4088e60bf0c 100644 (file)
@@ -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);