FreeBSD/contrib/gcc/cp/error.c
/* Dump, under control of FLAGS, a template-parameter-list binding.
   PARMS is a TREE_LIST of TREE_VEC of TREE_LIST and ARGS is a
   TREE_VEC.  */
Dump, under control of FLAGS, a template-parameter-list binding.
Dump under control of FLAGS a template - parameter - list binding .
static void
dump_template_bindings (tree parms, tree args)
{
  int need_comma = 0;
  while (parms)
    {
      tree p = TREE_VALUE (parms);
      int lvl = TMPL_PARMS_DEPTH (parms);
      int arg_idx = 0;
      int i;
      for (i = 0; i < TREE_VEC_LENGTH (p); ++i)
	{
	  tree arg = NULL_TREE;
	  if (TMPL_ARGS_DEPTH (args) >= lvl)
	    {
	      tree lvl_args = TMPL_ARGS_LEVEL (args, lvl);
	      if (NUM_TMPL_ARGS (lvl_args) > arg_idx)
		arg = TREE_VEC_ELT (lvl_args, arg_idx);
	    }
	  if (need_comma)
	    pp_separate_with_comma (cxx_pp);
	  dump_template_parameter (TREE_VEC_ELT (p, i), TFF_PLAIN_IDENTIFIER);
	  pp_cxx_whitespace (cxx_pp);
	  pp_equal (cxx_pp);
	  pp_cxx_whitespace (cxx_pp);
	  if (arg)
	    dump_template_argument (arg, TFF_PLAIN_IDENTIFIER);
	  else
	    pp_identifier (cxx_pp, "<missing>");
	  ++arg_idx;
	  need_comma = 1;
	}
      parms = TREE_CHAIN (parms);
    }
}
static void dump_template_bindings ( tree parms , tree args ) { int need_comma = 0 ; while ( parms ) { tree p = TREE_VALUE ( parms ) ; int lvl = TMPL_PARMS_DEPTH ( parms ) ; int arg_idx = 0 ; int i ; for ( i = 0 ; i < TREE_VEC_LENGTH ( p ) ; ++ i ) { tree arg = NULL_TREE ; if ( TMPL_ARGS_DEPTH ( args ) >= lvl ) { tree lvl_args = TMPL_ARGS_LEVEL ( args , lvl ) ; if ( NUM_TMPL_ARGS ( lvl_args ) > arg_idx ) arg = TREE_VEC_ELT ( lvl_args , arg_idx ) ; } if ( need_comma ) pp_separate_with_comma ( cxx_pp ) ; dump_template_parameter ( TREE_VEC_ELT ( p , i ) , TFF_PLAIN_IDENTIFIER ) ; pp_cxx_whitespace ( cxx_pp ) ; pp_equal ( cxx_pp ) ; pp_cxx_whitespace ( cxx_pp ) ; if ( arg ) dump_template_argument ( arg , TFF_PLAIN_IDENTIFIER ) ; else pp_identifier ( cxx_pp , " " ) ; ++ arg_idx ; need_comma = 1 ; } parms = TREE_CHAIN ( parms ) ; } }
Dump, under control of FLAGS, a template-parameter-list binding.
Dump under control of FLAGS a template - parameter - list binding .
/* Don't crash if we had an invalid argument list.  */