FreeBSD/contrib/gcc/cp/error.c
/* Print out a class declaration T under the control of FLAGS,
   in the form `class foo'.  */
Print out a class declaration T under the control of FLAGS,
in the form `class foo'.
Print out a class declaration T under the control of FLAGS in the form ` class foo ' .
static void
dump_aggr_type (tree t, int flags)
{
  tree name;
  const char *variety = class_key_or_enum_as_string (t);
  int typdef = 0;
  int tmplate = 0;
  pp_cxx_cv_qualifier_seq (cxx_pp, t);
  if (flags & TFF_CLASS_KEY_OR_ENUM)
    pp_cxx_identifier (cxx_pp, variety);
  if (flags & TFF_CHASE_TYPEDEF)
    t = TYPE_MAIN_VARIANT (t);
  name = TYPE_NAME (t);
  if (name)
    {
      typdef = !DECL_ARTIFICIAL (name);
      tmplate = !typdef && TREE_CODE (t) != ENUMERAL_TYPE
		&& TYPE_LANG_SPECIFIC (t) && CLASSTYPE_TEMPLATE_INFO (t)
		&& (TREE_CODE (CLASSTYPE_TI_TEMPLATE (t)) != TEMPLATE_DECL
		    || PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t)));
      dump_scope (CP_DECL_CONTEXT (name), flags | TFF_SCOPE);
      if (tmplate)
	{
	  tree tpl = CLASSTYPE_TI_TEMPLATE (t);
	  while (DECL_TEMPLATE_INFO (tpl))
	    tpl = DECL_TI_TEMPLATE (tpl);
	  name = tpl;
	}
      name = DECL_NAME (name);
    }
  if (name == 0 || ANON_AGGRNAME_P (name))
    {
      if (flags & TFF_CLASS_KEY_OR_ENUM)
	pp_identifier (cxx_pp, "<anonymous>");
      else
	pp_printf (pp_base (cxx_pp), "<anonymous %s>", variety);
    }
  else
    pp_cxx_tree_identifier (cxx_pp, name);
  if (tmplate)
    dump_template_parms (TYPE_TEMPLATE_INFO (t),
			 !CLASSTYPE_USE_TEMPLATE (t),
			 flags & ~TFF_TEMPLATE_HEADER);
}
static void dump_aggr_type ( tree t , int flags ) { tree name ; const char * variety = class_key_or_enum_as_string ( t ) ; int typdef = 0 ; int tmplate = 0 ; pp_cxx_cv_qualifier_seq ( cxx_pp , t ) ; if ( flags & TFF_CLASS_KEY_OR_ENUM ) pp_cxx_identifier ( cxx_pp , variety ) ; if ( flags & TFF_CHASE_TYPEDEF ) t = TYPE_MAIN_VARIANT ( t ) ; name = TYPE_NAME ( t ) ; if ( name ) { typdef = ! DECL_ARTIFICIAL ( name ) ; tmplate = ! typdef && TREE_CODE ( t ) != ENUMERAL_TYPE && TYPE_LANG_SPECIFIC ( t ) && CLASSTYPE_TEMPLATE_INFO ( t ) && ( TREE_CODE ( CLASSTYPE_TI_TEMPLATE ( t ) ) != TEMPLATE_DECL || PRIMARY_TEMPLATE_P ( CLASSTYPE_TI_TEMPLATE ( t ) ) ) ; dump_scope ( CP_DECL_CONTEXT ( name ) , flags | TFF_SCOPE ) ; if ( tmplate ) { tree tpl = CLASSTYPE_TI_TEMPLATE ( t ) ; while ( DECL_TEMPLATE_INFO ( tpl ) ) tpl = DECL_TI_TEMPLATE ( tpl ) ; name = tpl ; } name = DECL_NAME ( name ) ; } if ( name == 0 || ANON_AGGRNAME_P ( name ) ) { if ( flags & TFF_CLASS_KEY_OR_ENUM ) pp_identifier ( cxx_pp , " " ) ; else pp_printf ( pp_base ( cxx_pp ) , " " , variety ) ; } else pp_cxx_tree_identifier ( cxx_pp , name ) ; if ( tmplate ) dump_template_parms ( TYPE_TEMPLATE_INFO ( t ) , ! CLASSTYPE_USE_TEMPLATE ( t ) , flags & ~ TFF_TEMPLATE_HEADER ) ; }
Print out a class declaration T under the control of FLAGS,
in the form `class foo'.
Print out a class declaration T under the control of FLAGS in the form ` class foo ' .
/* Because the template names are mangled, we have to locate
	     the most general template, and use that name.  */