+2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * pt.c (tsubst_decl): Use VOID_TYPE_P.
+ * semantics.c: Fix some typos.
+
2001-04-23 Phil Edwards <pme@sources.redhat.com>
* cp/decl2.c (flag_honor_std): Always initialize to 1.
DECL_INITIAL (r) = tsubst_expr (DECL_INITIAL (t), args,
/*complain=*/1, in_decl);
TREE_CHAIN (r) = NULL_TREE;
- if (TREE_CODE (type) == VOID_TYPE)
- cp_error_at ("instantiation of `%D' as type void", r);
+ if (VOID_TYPE_P (type))
+ cp_error_at ("instantiation of `%D' as type `%T'", r, type);
}
break;
register_local_specialization (r, t);
TREE_CHAIN (r) = NULL_TREE;
- if (TREE_CODE (r) == VAR_DECL && TREE_CODE (type) == VOID_TYPE)
- cp_error_at ("instantiation of `%D' as type void", r);
+ if (TREE_CODE (r) == VAR_DECL && VOID_TYPE_P (type))
+ cp_error_at ("instantiation of `%D' as type `%T'", r, type);
}
break;
RECHAIN_STMTS (if_stmt, ELSE_CLAUSE (if_stmt));
}
-/* Finsh an if-statement. */
+/* Finish an if-statement. */
void
finish_if_stmt ()
{
/* Similarly, all destructors must run destructors for
base-classes before returning. So, all returns in a
- destructor get sent to the DTOR_LABEL; finsh_function emits
+ destructor get sent to the DTOR_LABEL; finish_function emits
code to return a value there. */
return finish_goto_stmt (dtor_label);
}