FreeBSD/contrib/gcc/cp/error.c
/* Dump a human-readable equivalent of TYPE.  FLAGS controls the
   format.  */
Dump a human-readable equivalent of TYPE.  FLAGS controls the
format.
Dump a human - readable equivalent of TYPE . FLAGS controls the format .
static void
dump_type (tree t, int flags)
{
  if (t == NULL_TREE)
    return;
  if (TYPE_PTRMEMFUNC_P (t))
    goto offset_type;
  switch (TREE_CODE (t))
    {
    case UNKNOWN_TYPE:
      pp_identifier (cxx_pp, "<unresolved overloaded function type>");
      break;
    case TREE_LIST:
      dump_parameters (t, flags);
      break;
    case IDENTIFIER_NODE:
      pp_cxx_tree_identifier (cxx_pp, t);
      break;
    case TREE_BINFO:
      dump_type (BINFO_TYPE (t), flags);
      break;
    case RECORD_TYPE:
    case UNION_TYPE:
    case ENUMERAL_TYPE:
      dump_aggr_type (t, flags);
      break;
    case TYPE_DECL:
      if (flags & TFF_CHASE_TYPEDEF)
	{
	  dump_type (DECL_ORIGINAL_TYPE (t)
		     ? DECL_ORIGINAL_TYPE (t) : TREE_TYPE (t), flags);
	  break;
	}
    case TEMPLATE_DECL:
    case NAMESPACE_DECL:
      dump_decl (t, flags & ~TFF_DECL_SPECIFIERS);
      break;
    case INTEGER_TYPE:
    case REAL_TYPE:
    case VOID_TYPE:
    case BOOLEAN_TYPE:
    case COMPLEX_TYPE:
    case VECTOR_TYPE:
      pp_type_specifier_seq (cxx_pp, t);
      break;
    case TEMPLATE_TEMPLATE_PARM:
      if (TYPE_IDENTIFIER (t))
	pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
      else
	pp_cxx_canonical_template_parameter (cxx_pp, t);
      break;
    case BOUND_TEMPLATE_TEMPLATE_PARM:
      {
	tree args = TYPE_TI_ARGS (t);
	pp_cxx_cv_qualifier_seq (cxx_pp, t);
	pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
	pp_cxx_begin_template_argument_list (cxx_pp);
	dump_template_argument_list (args, flags);
	pp_cxx_end_template_argument_list (cxx_pp);
      }
      break;
    case TEMPLATE_TYPE_PARM:
      pp_cxx_cv_qualifier_seq (cxx_pp, t);
      if (TYPE_IDENTIFIER (t))
	pp_cxx_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
      else
	pp_cxx_canonical_template_parameter
	  (cxx_pp, TEMPLATE_TYPE_PARM_INDEX (t));
      break;
    case ARRAY_TYPE:
    case POINTER_TYPE:
    case BLOCK_POINTER_TYPE:
    case REFERENCE_TYPE:
    case OFFSET_TYPE:
    offset_type:
    case FUNCTION_TYPE:
    case METHOD_TYPE:
    {
      dump_type_prefix (t, flags);
      dump_type_suffix (t, flags);
      break;
    }
    case TYPENAME_TYPE:
      pp_cxx_cv_qualifier_seq (cxx_pp, t);
      pp_cxx_identifier (cxx_pp,
			 TYPENAME_IS_ENUM_P (t) ? "enum"
			 : TYPENAME_IS_CLASS_P (t) ? "class"
			 : "typename");
      dump_typename (t, flags);
      break;
    case UNBOUND_CLASS_TEMPLATE:
      dump_type (TYPE_CONTEXT (t), flags);
      pp_cxx_colon_colon (cxx_pp);
      pp_cxx_identifier (cxx_pp, "template");
      dump_type (DECL_NAME (TYPE_NAME (t)), flags);
      break;
    case TYPEOF_TYPE:
      pp_cxx_identifier (cxx_pp, "__typeof__");
      pp_cxx_whitespace (cxx_pp);
      pp_cxx_left_paren (cxx_pp);
      dump_expr (TYPEOF_TYPE_EXPR (t), flags & ~TFF_EXPR_IN_PARENS);
      pp_cxx_right_paren (cxx_pp);
      break;
    default:
      pp_unsupported_tree (cxx_pp, t);
    case ERROR_MARK:
      pp_identifier (cxx_pp, "<type error>");
      break;
    }
}
static void dump_type ( tree t , int flags ) { if ( t == NULL_TREE ) return ; if ( TYPE_PTRMEMFUNC_P ( t ) ) goto offset_type ; switch ( TREE_CODE ( t ) ) { case UNKNOWN_TYPE : pp_identifier ( cxx_pp , " " ) ; break ; case TREE_LIST : dump_parameters ( t , flags ) ; break ; case IDENTIFIER_NODE : pp_cxx_tree_identifier ( cxx_pp , t ) ; break ; case TREE_BINFO : dump_type ( BINFO_TYPE ( t ) , flags ) ; break ; case RECORD_TYPE : case UNION_TYPE : case ENUMERAL_TYPE : dump_aggr_type ( t , flags ) ; break ; case TYPE_DECL : if ( flags & TFF_CHASE_TYPEDEF ) { dump_type ( DECL_ORIGINAL_TYPE ( t ) ? DECL_ORIGINAL_TYPE ( t ) : TREE_TYPE ( t ) , flags ) ; break ; } case TEMPLATE_DECL : case NAMESPACE_DECL : dump_decl ( t , flags & ~ TFF_DECL_SPECIFIERS ) ; break ; case INTEGER_TYPE : case REAL_TYPE : case VOID_TYPE : case BOOLEAN_TYPE : case COMPLEX_TYPE : case VECTOR_TYPE : pp_type_specifier_seq ( cxx_pp , t ) ; break ; case TEMPLATE_TEMPLATE_PARM : if ( TYPE_IDENTIFIER ( t ) ) pp_cxx_tree_identifier ( cxx_pp , TYPE_IDENTIFIER ( t ) ) ; else pp_cxx_canonical_template_parameter ( cxx_pp , t ) ; break ; case BOUND_TEMPLATE_TEMPLATE_PARM : { tree args = TYPE_TI_ARGS ( t ) ; pp_cxx_cv_qualifier_seq ( cxx_pp , t ) ; pp_cxx_tree_identifier ( cxx_pp , TYPE_IDENTIFIER ( t ) ) ; pp_cxx_begin_template_argument_list ( cxx_pp ) ; dump_template_argument_list ( args , flags ) ; pp_cxx_end_template_argument_list ( cxx_pp ) ; } break ; case TEMPLATE_TYPE_PARM : pp_cxx_cv_qualifier_seq ( cxx_pp , t ) ; if ( TYPE_IDENTIFIER ( t ) ) pp_cxx_tree_identifier ( cxx_pp , TYPE_IDENTIFIER ( t ) ) ; else pp_cxx_canonical_template_parameter ( cxx_pp , TEMPLATE_TYPE_PARM_INDEX ( t ) ) ; break ; case ARRAY_TYPE : case POINTER_TYPE : case BLOCK_POINTER_TYPE : case REFERENCE_TYPE : case OFFSET_TYPE : offset_type : case FUNCTION_TYPE : case METHOD_TYPE : { dump_type_prefix ( t , flags ) ; dump_type_suffix ( t , flags ) ; break ; } case TYPENAME_TYPE : pp_cxx_cv_qualifier_seq ( cxx_pp , t ) ; pp_cxx_identifier ( cxx_pp , TYPENAME_IS_ENUM_P ( t ) ? " " : TYPENAME_IS_CLASS_P ( t ) ? " " : " " ) ; dump_typename ( t , flags ) ; break ; case UNBOUND_CLASS_TEMPLATE : dump_type ( TYPE_CONTEXT ( t ) , flags ) ; pp_cxx_colon_colon ( cxx_pp ) ; pp_cxx_identifier ( cxx_pp , " " ) ; dump_type ( DECL_NAME ( TYPE_NAME ( t ) ) , flags ) ; break ; case TYPEOF_TYPE : pp_cxx_identifier ( cxx_pp , " " ) ; pp_cxx_whitespace ( cxx_pp ) ; pp_cxx_left_paren ( cxx_pp ) ; dump_expr ( TYPEOF_TYPE_EXPR ( t ) , flags & ~ TFF_EXPR_IN_PARENS ) ; pp_cxx_right_paren ( cxx_pp ) ; break ; default : pp_unsupported_tree ( cxx_pp , t ) ; case ERROR_MARK : pp_identifier ( cxx_pp , " " ) ; break ; } }
Dump a human-readable equivalent of TYPE.
Dump a human - readable equivalent of TYPE .
/* A list of function parms.  */ /* Else fall through.  */ /* For parameters inside template signature.  */ /* This is not always necessary for pointers and such, but doing this
	 reduces code size.  */ /* APPLE LOCAL blocks 6040305 */ /* Fall through to error.  */