OSDN Git Service

2006-08-09 Lee Millward <lee.millward@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / error.c
index d6c813d..f873558 100644 (file)
@@ -1242,7 +1242,15 @@ dump_template_parms (tree info, int primary, int flags)
 
       for (ix = 0; ix != len; ix++)
        {
-         tree parm = TREE_VALUE (TREE_VEC_ELT (parms, ix));
+         tree parm;
+
+          if (TREE_VEC_ELT (parms, ix) == error_mark_node)
+            {
+              pp_identifier (cxx_pp, "<template parameter error>");
+              continue;
+            }
+
+          parm = TREE_VALUE (TREE_VEC_ELT (parms, ix));
 
          if (ix)
            pp_separate_with_comma (cxx_pp);