This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) fix for function parms of template type
- To: egcs-patches at cygnus dot com
- Subject: (C++) fix for function parms of template type
- From: Jason Merrill <jason at cygnus dot com>
- Date: Sat, 21 Nov 1998 16:23:44 -0800
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.