This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) nested field name lookup patch
- To: egcs-patches at cygnus dot com
- Subject: (C++) nested field name lookup patch
- From: Jason Merrill <jason at cygnus dot com>
- Date: Wed, 24 Mar 1999 02:37:17 -0800
Fixes g++.other/lookup10.C.
1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): Do nested field lookup regardless of
TYPE_BEING_DEFINED.
Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.328
diff -c -p -r1.328 decl.c
*** decl.c 1999/03/24 01:10:06 1.328
--- decl.c 1999/03/24 10:34:10
*************** lookup_name_real (name, prefer_type, non
*** 5503,5515 ****
classes explicitly. */
if (!val && !nonclass
&& current_class_type && TYPE_BEING_DEFINED (current_class_type))
! {
! val = qualify_lookup (lookup_field (current_class_type, name, 0, 0),
! flags);
! if (!val)
! val = qualify_lookup (lookup_nested_field (name, !yylex),
! flags);
! }
/* If we found a type from a dependent base class (using the
implicit typename extension) make sure that there's not some
--- 5503,5514 ----
classes explicitly. */
if (!val && !nonclass
&& current_class_type && TYPE_BEING_DEFINED (current_class_type))
! val = qualify_lookup (lookup_field (current_class_type, name, 0, 0),
! flags);
!
! /* The name might be from an enclosing class of the current scope. */
! if (!val && !nonclass && current_class_type)
! val = qualify_lookup (lookup_nested_field (name, !yylex), flags);
/* If we found a type from a dependent base class (using the
implicit typename extension) make sure that there's not some