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]

Re: Internal compiler error 754867


> The convention in the compiler is to call convert_to_reference from
> anything that might be producing a reference.  In this case, that would be
> the condition rule in parse.y.

This should be convert_from_reference, no? Here's the revised patch.

Martin

1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>

	* parse.y (condition): Convert VAR_DECL from reference to indirect
	reference.

Index: parse.y
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/parse.y,v
retrieving revision 1.96
diff -c -p -r1.96 parse.y
*** parse.y	1998/10/22 14:52:02	1.96
--- parse.y	1998/10/23 21:36:41
*************** condition:
*** 1021,1027 ****
  		{ 
  		  cp_finish_decl ($<ttype>6, $7, $4, 1, LOOKUP_ONLYCONVERTING);
  		  resume_momentary ($<itype>5);
! 		  $$ = $<ttype>6; 
  		  if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
  		    cp_error ("definition of array `%#D' in condition", $$); 
  		}
--- 1021,1027 ----
  		{ 
  		  cp_finish_decl ($<ttype>6, $7, $4, 1, LOOKUP_ONLYCONVERTING);
  		  resume_momentary ($<itype>5);
! 		  $$ = convert_from_reference ($<ttype>6); 
  		  if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
  		    cp_error ("definition of array `%#D' in condition", $$); 
  		}


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