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++) namespace tweak


Fixes ambiguity checking for explicit lookups, caught by Perennial.

1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>

	* decl.c (lookup_name_real): Set the complain flag if we're
	looking for a namespace member.

Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.393
diff -c -p -r1.393 decl.c
*** decl.c	1999/08/06 20:44:44	1.393
--- decl.c	1999/08/07 00:56:02
*************** lookup_name_real (name, prefer_type, non
*** 5707,5712 ****
--- 5707,5713 ----
  	    {
  	      struct tree_binding b;
  	      val = binding_init (&b);
+ 	      flags |= LOOKUP_COMPLAIN;
  	      if (!qualified_lookup_using_namespace (name, type, val, flags))
  		return NULL_TREE;
  	      val = select_decl (val, flags);
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.227
diff -c -p -r1.227 decl2.c
*** decl2.c	1999/08/03 10:18:12	1.227
--- decl2.c	1999/08/07 00:56:03
*************** lookup_using_namespace (name, val, using
*** 4421,4428 ****
  }
  
  /* [namespace.qual]
!    Excepts the name to lookup and its qualifying scope.
!    Returns the name/type pair found into the CPLUS_BINDING result,
     or 0 on error. */
  
  int
--- 4421,4428 ----
  }
  
  /* [namespace.qual]
!    Accepts the NAME to lookup and its qualifying SCOPE.
!    Returns the name/type pair found into the CPLUS_BINDING RESULT,
     or 0 on error. */
  
  int

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