/* Call-backs for C++ error reporting.
This code is non-reentrant.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
case TEMPLATE_ID_EXPR:
{
tree name = TREE_OPERAND (t, 0);
+ tree args = TREE_OPERAND (t, 1);
if (is_overloaded_fn (name))
name = DECL_NAME (get_first_fn (name));
dump_decl (name, flags);
pp_cxx_begin_template_argument_list (cxx_pp);
- if (TREE_OPERAND (t, 1))
- dump_template_argument_list (TREE_OPERAND (t, 1), flags);
- pp_cxx_end_template_argument_list (cxx_pp);
+ if (args == error_mark_node)
+ pp_string (cxx_pp, M_("<template arguments error>"));
+ else if (args)
+ dump_template_argument_list (args, flags);
+ pp_cxx_end_template_argument_list (cxx_pp);
}
break;