+2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * error.c (dump_template_decl): Output template parameters
+ together with their specifiers.
+ Output `class' prefix for template template parameter.
+ (dump_decl): Fix formatting.
+
2001-08-30 Kurt Garloff <garloff@suse.de>
* optimize.c (inlinable_function_p): Allow only smaller single
break;
case TEMPLATE_DECL:
- dump_template_decl (t, flags);
+ dump_template_decl (t, flags);
break;
case TEMPLATE_ID_EXPR:
int len = TREE_VEC_LENGTH (inner_parms);
output_add_string (scratch_buffer, "template<");
+
+ /* If we've shown the template prefix, we'd better show the
+ parameters' and decl's type too. */
+ flags |= TFF_DECL_SPECIFIERS;
+
for (i = 0; i < len; i++)
{
if (i)
output_add_space (scratch_buffer);
}
nreverse(orig_parms);
- /* If we've shown the template<args> prefix, we'd better show the
- decl's type too. */
- flags |= TFF_DECL_SPECIFIERS;
+
+ if (DECL_TEMPLATE_TEMPLATE_PARM_P (t))
+ /* Say `template<arg> class TT' not just `template<arg> TT'. */
+ output_add_string (scratch_buffer, "class ");
}
+
if (TREE_CODE (DECL_TEMPLATE_RESULT (t)) == TYPE_DECL)
dump_type (TREE_TYPE (t),
((flags & ~TFF_CLASS_KEY_OR_ENUM) | TFF_TEMPLATE_NAME