else if (TREE_CODE (field) == TYPE_DECL && DECL_ARTIFICIAL  (field) && IMPLICIT_TYPENAME_P (TREE_TYPE (field)))  ;
do_identifier (token, parsing, args)     register tree token;     int parsing;     tree args;{  register tree id;  int lexing = (parsing == 1);  int in_call = (parsing == 2);  if (! lexing || IDENTIFIER_OPNAME_P (token))    id = lookup_name (token, 0);  else    id = lastiddecl;  /* Scope class declarations before global     declarations.  */  if ((!id || is_global (id))      && current_class_type != 0      && TYPE_SIZE (current_class_type) == 0)    {      /* Could be from one of the base classes.  */      tree field = lookup_field (current_class_type, token, 1, 0);      if (field == 0)	;      else if (field == error_mark_node)	/* We have already generated the error message.	   But we still want to return this value.  */	id = lookup_field (current_class_type, token, 0, 0);      else if (TREE_CODE (field) == VAR_DECL	       || TREE_CODE (field) == CONST_DECL	       || TREE_CODE (field) == TEMPLATE_DECL)	id = field;      else if (TREE_CODE (field) != FIELD_DECL)	my_friendly_abort (61);      else	{	  cp_error ("invalid use of member `%D'", field);	  id = error_mark_node;	  return id;	}    }  /* Do Koenig lookup if appropriate (inside templates we build lookup     expressions instead).  */  if (args && !current_template_parms && (!id || is_global (id)))    /* If we have arguments and we only found global names, do Koenig       lookup. */    id = lookup_arg_dependent (token, id, args);  /* Remember that this name has been used in the class definition, as per     [class.scope0] */  if (id && parsing      /* Avoid breaking if we get called for a default argument that	 refers to an overloaded method.  Eventually this will not be	 necessary, since default arguments shouldn't be parsed until	 after the class is complete.  (jason 3/12/97) */      && TREE_CODE (id) != OVERLOAD)    maybe_note_name_used_in_class (token, id);  if (id == error_mark_node)    {      /* lookup_name quietly returns error_mark_node if we're parsing,	 as we don't want to complain about an identifier that ends up	 being used as a declarator.  So we call it again to get the error	 message.  */      id = lookup_name (token, 0);      return error_mark_node;    }        if (!id)    {      if (current_template_parms)	return build_min_nt (LOOKUP_EXPR, token);      else if (IDENTIFIER_OPNAME_P (token))	{	  if (token != ansi_opname[ERROR_MARK])	    cp_error ("`%D' not defined", token);	  id = error_mark_node;	}      else if (in_call && ! flag_strict_prototype)	{	  id = implicitly_declare (token);	}      else if (current_function_decl == 0)	{	  cp_error ("`%D' was not declared in this scope", token);	  id = error_mark_node;	}      else	{	  if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node	      || IDENTIFIER_ERROR_LOCUS (token) != current_function_decl)	    {	      static int undeclared_variable_notice;	      cp_error ("`%D' undeclared (first use this function)", token);	      if (! undeclared_variable_notice)		{		  error ("(Each undeclared identifier is reported only once");		  error ("for each function it appears in.)");		  undeclared_variable_notice = 1;		}	    }	  id = error_mark_node;	  /* Prevent repeated error messages.  */	  SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);	  SET_IDENTIFIER_ERROR_LOCUS (token, current_function_decl);	}    }  if (TREE_CODE (id) == VAR_DECL && DECL_DEAD_FOR_LOCAL (id))    {      tree shadowed = DECL_SHADOWED_FOR_VAR (id);      while (shadowed != NULL_TREE && TREE_CODE (shadowed) == VAR_DECL	     && DECL_DEAD_FOR_LOCAL (shadowed))	shadowed = DECL_SHADOWED_FOR_VAR (shadowed);      if (!shadowed)	shadowed = IDENTIFIER_NAMESPACE_VALUE (DECL_NAME (id));      if (shadowed)	{	  if (!DECL_ERROR_REPORTED (id))	    {	      warning ("name lookup of `%s' changed",		       IDENTIFIER_POINTER (token));	      cp_warning_at ("  matches this `%D' under current ANSI rules",			     shadowed);	      cp_warning_at ("  matches this `%D' under old rules", id);	      DECL_ERROR_REPORTED (id) = 1;	    }	  id = shadowed;	}      else if (!DECL_ERROR_REPORTED (id))	{	  static char msg[]	    = "name lookup of `%s' changed for new ANSI `for' scoping";	  DECL_ERROR_REPORTED (id) = 1;	  if (TYPE_NEEDS_DESTRUCTOR (TREE_TYPE (id)))	    {	      error (msg, IDENTIFIER_POINTER (token));	      cp_error_at ("  cannot use obsolete binding at `%D' because it has a destructor", id);	      id = error_mark_node;	    }	  else	    {	      pedwarn (msg, IDENTIFIER_POINTER (token));	      cp_pedwarn_at ("  using obsolete binding at `%D'", id);	    }	}    }  /* TREE_USED is set in `hack_identifier'.  */  if (TREE_CODE (id) == CONST_DECL)    {      /* Check access.  */      if (IDENTIFIER_CLASS_VALUE (token) == id)	enforce_access (DECL_REAL_CONTEXT(id), id);      if (!processing_template_decl || DECL_TEMPLATE_PARM_P (id))	id = DECL_INITIAL (id);    }  else    id = hack_identifier (id, token);  /* We must look up dependent names when the template is     instantiated, not while parsing it.  For now, we don't     distinguish between dependent and independent names.  So, for     example, we look up all overloaded functions at     instantiation-time, even though in some cases we should just use     the DECL we have here.  We also use LOOKUP_EXPRs to find things     like local variables, rather than creating TEMPLATE_DECLs for the     local variables and then finding matching instantiations.  */  if (current_template_parms      && (is_overloaded_fn (id) 	  /* If it's not going to be around at instantiation time, we	     look it up then.  This is a hack, and should go when we	     really get dependent/independent name lookup right.  */	  || !TREE_PERMANENT (id)	  /* Some local VAR_DECLs (such as those for local variables	     in member functions of local classes) are built on the	     permanent obstack.  */	  || (TREE_CODE (id) == VAR_DECL 	      && 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);        return id;}