This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) patch to do_identifier
- To: egcs-patches at cygnus dot com
- Subject: (C++) patch to do_identifier
- From: Jason Merrill <jason at cygnus dot com>
- Date: Tue, 27 Oct 1998 23:47:05 -0800
Applied. Fixes g++.robertl/eb27.C.
1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
* lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
* method.c (hack_identifier): Also check for using RESULT_DECL
from outer context.
Index: lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lex.c,v
retrieving revision 1.81
diff -c -p -r1.81 lex.c
*** lex.c 1998/10/23 14:53:08 1.81
--- lex.c 1998/10/28 07:46:00
*************** do_identifier (token, parsing, args)
*** 3070,3075 ****
--- 3070,3076 ----
&& CP_DECL_CONTEXT (id)
&& TREE_CODE (CP_DECL_CONTEXT (id)) == FUNCTION_DECL)
|| TREE_CODE (id) == PARM_DECL
+ || TREE_CODE (id) == RESULT_DECL
|| TREE_CODE (id) == USING_DECL))
id = build_min_nt (LOOKUP_EXPR, token);
Index: method.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/method.c,v
retrieving revision 1.81
diff -c -p -r1.81 method.c
*** method.c 1998/10/23 14:53:10 1.81
--- method.c 1998/10/28 07:46:00
*************** hack_identifier (value, name)
*** 1924,1930 ****
else
mark_used (value);
! if (TREE_CODE (value) == VAR_DECL || TREE_CODE (value) == PARM_DECL)
{
tree context = decl_function_context (value);
if (context != NULL_TREE && context != current_function_decl
--- 1924,1931 ----
else
mark_used (value);
! if (TREE_CODE (value) == VAR_DECL || TREE_CODE (value) == PARM_DECL
! || TREE_CODE (value) == RESULT_DECL)
{
tree context = decl_function_context (value);
if (context != NULL_TREE && context != current_function_decl