From: Nathan Sidwell Date: Tue, 24 Apr 2001 08:13:38 +0000 (+0000) Subject: pt.c (tsubst_decl): Use VOID_TYPE_P. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfbb4f347cf43b955f56ecbc9709b8836d395ee5;p=gcc.git pt.c (tsubst_decl): Use VOID_TYPE_P. cp: * pt.c (tsubst_decl): Use VOID_TYPE_P. * semantics.c: Fix some typos. From-SVN: r41519 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9db3d9c19c1..31c1f92c7fb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-04-24 Nathan Sidwell + + * pt.c (tsubst_decl): Use VOID_TYPE_P. + * semantics.c: Fix some typos. + 2001-04-23 Phil Edwards * cp/decl2.c (flag_honor_std): Always initialize to 1. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ac88beca804..1b88a783986 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5901,8 +5901,8 @@ tsubst_decl (t, args, type) 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; @@ -6015,8 +6015,8 @@ tsubst_decl (t, args, type) 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; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 2141e5ca209..8dae039192e 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -284,7 +284,7 @@ finish_else_clause (if_stmt) RECHAIN_STMTS (if_stmt, ELSE_CLAUSE (if_stmt)); } -/* Finsh an if-statement. */ +/* Finish an if-statement. */ void finish_if_stmt () @@ -403,7 +403,7 @@ finish_return_stmt (expr) { /* 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); }