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++ PATCH for error-message



This patch fixes the error message emitted on code like:
  
  int a;
  using a::a;

where we use to issue some sorrys.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

1999-03-12  Mark Mitchell  <mark@markmitchell.com>

	* decl2.c (validate_nonmember_using_decl): Issue sensible
	error-messages on bogus qualifiers.
	
Index: testsuite/cp/decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.190
diff -c -p -r1.190 decl2.c
*** decl2.c	1999/03/06 03:54:30	1.190
--- decl2.c	1999/03/13 00:34:34
*************** validate_nonmember_using_decl (decl, sco
*** 4680,4686 ****
  	 member-declaration.  */
        if (TREE_CODE (*scope) != NAMESPACE_DECL)
  	{
! 	  cp_error ("`%D' is not a namespace", *scope);
  	  return NULL_TREE;
  	}
      }
--- 4680,4689 ----
  	 member-declaration.  */
        if (TREE_CODE (*scope) != NAMESPACE_DECL)
  	{
! 	  if (TYPE_P (*scope))
! 	    cp_error ("`%T' is not a namespace", *scope);
! 	  else
! 	    cp_error ("`%D' is not a namespace", *scope);
  	  return NULL_TREE;
  	}
      }


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