This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) error recovery patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: (C++) error recovery patch
- From: Jason Merrill <jason at redhat dot com>
- Date: Thu, 15 Jun 2000 14:20:45 -0700
Fixes crash on g++.robertl/eb129a.C.
2000-06-13 Jason Merrill <jason@redhat.com>
* typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
* init.c (build_member_call): Pull out the name of a DECL.
Index: init.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/init.c,v
retrieving revision 1.199
diff -c -p -r1.199 init.c
*** init.c 2000/06/14 05:30:04 1.199
--- init.c 2000/06/15 21:18:53
*************** build_member_call (type, name, parmlist)
*** 1470,1475 ****
--- 1470,1478 ----
return build_x_function_call (name, parmlist, current_class_ref);
}
+ if (DECL_P (name))
+ name = DECL_NAME (name);
+
if (type == std_node)
return build_x_function_call (do_scoped_id (name, 0), parmlist,
current_class_ref);
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.289
diff -c -p -r1.289 typeck.c
*** typeck.c 2000/05/28 02:58:19 1.289
--- typeck.c 2000/06/15 21:19:06
*************** build_x_function_call (function, params,
*** 2578,2584 ****
if ((TREE_CODE (function) == FUNCTION_DECL
&& DECL_STATIC_FUNCTION_P (function))
! || (TREE_CODE (function) == TEMPLATE_DECL
&& DECL_STATIC_FUNCTION_P (DECL_TEMPLATE_RESULT (function))))
return build_member_call (DECL_CONTEXT (function),
template_id
--- 2578,2584 ----
if ((TREE_CODE (function) == FUNCTION_DECL
&& DECL_STATIC_FUNCTION_P (function))
! || (DECL_FUNCTION_TEMPLATE_P (function)
&& DECL_STATIC_FUNCTION_P (DECL_TEMPLATE_RESULT (function))))
return build_member_call (DECL_CONTEXT (function),
template_id