+2002-01-16 Jason Merrill <jason@redhat.com>
+
+ * error.c (dump_type_suffix): Print the exception specs before
+ recursing.
+ (dump_function_decl): Here, too.
+
+ * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
+
2002-01-10 Ira Ruben <ira@apple.com>
* decl.c (start_method): Handle attrlist.
/* The number of levels of template parameters given by NODE. */
#define TMPL_PARMS_DEPTH(NODE) \
- (TREE_INT_CST_LOW (TREE_PURPOSE (NODE)))
+ ((HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_PURPOSE (NODE)))
/* The TEMPLATE_DECL instantiated or specialized by NODE. This
TEMPLATE_DECL will be the immediate parent, not the most general
if (TREE_CODE (t) == METHOD_TYPE)
dump_qualifiers
(TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t))), before);
- dump_type_suffix (TREE_TYPE (t), flags);
dump_exception_spec (TYPE_RAISES_EXCEPTIONS (t), flags);
+ dump_type_suffix (TREE_TYPE (t), flags);
break;
}
{
dump_parameters (parmtypes, flags);
- if (show_return)
- dump_type_suffix (TREE_TYPE (fntype), flags);
-
if (TREE_CODE (fntype) == METHOD_TYPE)
dump_qualifiers (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (fntype))),
before);
if (flags & TFF_EXCEPTION_SPECIFICATION)
dump_exception_spec (TYPE_RAISES_EXCEPTIONS (fntype), flags);
+
+ if (show_return)
+ dump_type_suffix (TREE_TYPE (fntype), flags);
}
/* If T is a template instantiation, dump the parameter binding. */
--- /dev/null
+// Test for proper error message formatting; the throw() should go inside
+// the parens, as below.
+
+void (*g() throw())(); // { dg-error "g\\(\\) throw" "" }
+void (*g())(); // { dg-error "" "" }