aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2000-06-22 16:54:48 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-06-22 16:54:48 -0400
commit655dc6eebfd39f08c7887a55a7c0895ac5e44b6e (patch)
treea9d13ba02c4103d59a41ecf0eaa05e6157457e33 /gcc/cp/decl2.c
parentbe05b708246e30cb94ee4df510b07bb0a70e9469 (diff)
downloadgcc-655dc6eebfd39f08c7887a55a7c0895ac5e44b6e.zip
gcc-655dc6eebfd39f08c7887a55a7c0895ac5e44b6e.tar.gz
gcc-655dc6eebfd39f08c7887a55a7c0895ac5e44b6e.tar.bz2
pt.c (tsubst_decl, [...]): Clear DECL_SAVED_TREE.
* pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. (tsubst_friend_function): Copy it here. * decl.c (grok_op_properties): Fix typo. * decl2.c (delete_sanity): Clarify warning, avoid failure on deleting void*. * pt.c (check_explicit_specialization): Clarify error. * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from an old OVERLOAD when we're declaring a non-function. (pushdecl, destroy_local_var): Check for error_mark_node. (warn_extern_redeclared_static): Also bail early if we're a CONST_DECL. (push_overloaded_decl): Ignore an old error_mark_node. From-SVN: r34652
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 75fed46..b034d78 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1283,8 +1283,11 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
/* Deleting ptr to void is undefined behaviour [expr.delete/3]. */
if (TREE_CODE (TREE_TYPE (type)) == VOID_TYPE)
- cp_warning ("`%T' is not a pointer-to-object type", type);
-
+ {
+ cp_warning ("deleting `%T' is undefined", type);
+ doing_vec = 0;
+ }
+
/* An array can't have been allocated by new, so complain. */
if (TREE_CODE (t) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL