(C++) patch to process_init_constructor

Jason Merrill jason@cygnus.com
Mon Oct 26 03:15:00 GMT 1998


Applied.  Fixes g++.law/union1.C.

1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>

	* typeck2.c (process_init_constructor): Only skip anonymous fields
	if they are bitfields.

Index: typeck2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/typeck2.c,v
retrieving revision 1.36
diff -c -p -r1.36 typeck2.c
*** typeck2.c	1998/10/26 02:07:12	1.36
--- typeck2.c	1998/10/26 10:33:58
*************** process_init_constructor (type, init, el
*** 1043,1049 ****
  	{
  	  register tree next1;
  
! 	  if (! DECL_NAME (field))
  	    {
  	      members = expr_tree_cons (field, integer_zero_node, members);
  	      continue;
--- 1043,1049 ----
  	{
  	  register tree next1;
  
! 	  if (! DECL_NAME (field) && DECL_C_BIT_FIELD (field))
  	    {
  	      members = expr_tree_cons (field, integer_zero_node, members);
  	      continue;



More information about the Gcc-patches mailing list