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]

(C++) fix for function parms of template type


We used to (incorrectly) instantiate a class if it was used to declare a
parm in a function declaration.  Disabling that caused problems because the
only time we were calling layout_decl was in build_decl.

Fixes Perennial Sec7/1_1/P07341.C.

1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>

	* decl.c (require_complete_types_for_parms): Call layout_decl
	after we've completed the type.

Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.266
diff -c -p -r1.266 decl.c
*** decl.c	1998/11/21 05:42:01	1.266
--- decl.c	1998/11/22 00:20:04
*************** require_complete_types_for_parms (parms)
*** 11015,11020 ****
--- 11015,11022 ----
  	    error ("parameter has incomplete type");
  	  TREE_TYPE (parms) = error_mark_node;
  	}
+       else
+ 	layout_decl (parms, 0);
  #if 0
        /* If the arg types are incomplete in a declaration,
  	 they must include undefined tags.


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