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]

Re: Small obvious fix for cp/init.c


Isn't this same as following?

http://gcc.gnu.org/ml/gcc-patches/2002-09/msg00552.html
I thought it was approved.

-Devang

On Thursday, October 10, 2002, at 12:53  PM, Zack Weinberg wrote:

valgrind caught this while I was looking for something else.
build_field_list in cp/init.c is responsible for setting its
'uses_unions_p' reference argument to indicate whether an aggregate
type is or contains a union.  But if there is no union at all, the
variable never gets initialized.

Will apply as obvious if bootstrap is successful.

zw

	* init.c (build_field_list): Set *uses_unions_p to 0 initially.

===================================================================
Index: cp/init.c
--- cp/init.c	2 Oct 2002 20:01:35 -0000	1.294
+++ cp/init.c	10 Oct 2002 19:52:25 -0000
@@ -417,6 +417,7 @@ build_field_list (t, list, uses_unions_p
   tree fields;

   /* Note whether or not T is a union.  */
+  *uses_unions_p = 0;
   if (TREE_CODE (t) == UNION_TYPE)
     *uses_unions_p = 1;








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]