This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: Uninteresting cleanup patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: [C++ PATCH]: Uninteresting cleanup patch
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Tue, 24 Apr 2001 11:15:02 +0100
- Organization: Codesourcery LLC
- References: <3AE5380C.FC3B5DA9@codesourcery.com>
Nathan Sidwell wrote:
> I've installed this uninteresting code cleanup on the mainline.
Oops, forgot to save the buffer, here's the patch I actually installed.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_decl): Use VOID_TYPE_P.
* semantics.c: Fix some typos.
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.529
diff -c -3 -p -r1.529 pt.c
*** pt.c 2001/04/12 14:15:48 1.529
--- pt.c 2001/04/24 08:00:27
*************** tsubst_decl (t, args, type)
*** 5901,5908 ****
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);
}
break;
--- 5901,5908 ----
DECL_INITIAL (r) = tsubst_expr (DECL_INITIAL (t), args,
/*complain=*/1, in_decl);
TREE_CHAIN (r) = NULL_TREE;
! if (VOID_TYPE_P (type))
! cp_error_at ("instantiation of `%D' as type `%T'", r, type);
}
break;
*************** tsubst_decl (t, args, type)
*** 6015,6022 ****
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);
}
break;
--- 6015,6022 ----
register_local_specialization (r, t);
TREE_CHAIN (r) = NULL_TREE;
! if (TREE_CODE (r) == VAR_DECL && VOID_TYPE_P (type))
! cp_error_at ("instantiation of `%D' as type `%T'", r, type);
}
break;
Index: cp/semantics.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/semantics.c,v
retrieving revision 1.204
diff -c -3 -p -r1.204 semantics.c
*** semantics.c 2001/04/19 22:49:48 1.204
--- semantics.c 2001/04/24 08:00:28
*************** finish_else_clause (if_stmt)
*** 284,290 ****
RECHAIN_STMTS (if_stmt, ELSE_CLAUSE (if_stmt));
}
! /* Finsh an if-statement. */
void
finish_if_stmt ()
--- 284,290 ----
RECHAIN_STMTS (if_stmt, ELSE_CLAUSE (if_stmt));
}
! /* Finish an if-statement. */
void
finish_if_stmt ()
*************** finish_return_stmt (expr)
*** 403,409 ****
{
/* 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
code to return a value there. */
return finish_goto_stmt (dtor_label);
}
--- 403,409 ----
{
/* Similarly, all destructors must run destructors for
base-classes before returning. So, all returns in a
! destructor get sent to the DTOR_LABEL; finish_function emits
code to return a value there. */
return finish_goto_stmt (dtor_label);
}