[C++ PATCH] Fix 14179 - memory-hog

Andreas Jaeger aj@suse.de
Tue Sep 21 11:00:00 GMT 2004


Andreas Tobler <toa@pop.agri.ch> writes:

> Giovanni Bajo wrote:
>
>> Index: decl.c
>> ===================================================================
>
>> +   bool sized_array_p = (max_index != NULL_TREE);
>> +   HOST_WIDE_INT max_index_cst;
>> +   HOST_WIDE_INT index;
>
> Hm, some uninitialized var......

I suggest to commit this as obvious,

Andreas

> Andreas
>
> Index: gcc/cp/decl.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
> retrieving revision 1.1298
> diff -u -r1.1298 decl.c
> --- gcc/cp/decl.c       21 Sep 2004 02:22:44 -0000      1.1298
> +++ gcc/cp/decl.c       21 Sep 2004 05:40:02 -0000
> @@ -4159,7 +4159,7 @@
>                      tree *initp, tree new_init)
>   {
>     bool sized_array_p = (max_index != NULL_TREE);
> -  HOST_WIDE_INT max_index_cst;
> +  HOST_WIDE_INT max_index_cst = 0;
>     HOST_WIDE_INT index;
>
>     if (sized_array_p)
>

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040921/c93e5729/attachment.sig>


More information about the Gcc-patches mailing list