aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-07-19 04:27:16 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-07-19 04:27:16 +0000
commitdbc957f103982bd3d8cb973beb26439d4e99ad8c (patch)
tree55d1f67ed10772a2950b1029d8cfb2d9fe75bb8e /gcc/cp/cp-tree.h
parent8458e9540166e45e4e9501cf2ae5a9aeb49b1468 (diff)
downloadgcc-dbc957f103982bd3d8cb973beb26439d4e99ad8c.zip
gcc-dbc957f103982bd3d8cb973beb26439d4e99ad8c.tar.gz
gcc-dbc957f103982bd3d8cb973beb26439d4e99ad8c.tar.bz2
class.c (type_requires_array_cookie): New function.
* class.c (type_requires_array_cookie): New function. (check_methods): Don't try to figure out whether the type needs a cookie here. (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. (TYPE_VEC_NEW_USES_COOKIE): Reimplement. * pt.c (instantiate_class_template): Don't set TYPE_VEC_DELETE_TAKES_SIZE. * NEWS: Document ABI changes from GCC 3.0. From-SVN: r44142
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e8a61a8..b32bd0c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1291,7 +1291,7 @@ struct lang_type
unsigned needs_virtual_reinit : 1;
unsigned marks: 6;
- unsigned vec_delete_takes_size : 1;
+ unsigned vec_new_uses_cookie : 1;
unsigned declared_class : 1;
unsigned being_defined : 1;
@@ -1353,19 +1353,11 @@ struct lang_type
#define TYPE_GETS_DELETE(NODE) (TYPE_LANG_SPECIFIC(NODE)->gets_delete)
#define TYPE_GETS_REG_DELETE(NODE) (TYPE_GETS_DELETE (NODE) & 1)
-/* Nonzero for _CLASSTYPE means that operator vec delete is defined and
- takes the optional size_t argument. */
-#define TYPE_VEC_DELETE_TAKES_SIZE(NODE) \
- (TYPE_LANG_SPECIFIC(NODE)->vec_delete_takes_size)
-
/* Nonzero if `new NODE[x]' should cause the allocation of extra
- storage to indicate how many array elements are in use. The old
- ABI had a bug in that we always allocate the extra storage if NODE
- has a two-argument array operator delete. */
-#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
- (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE) \
- || (TYPE_LANG_SPECIFIC (NODE) \
- && TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
+ storage to indicate how many array elements are in use. */
+#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
+ (CLASS_TYPE_P (NODE) \
+ && TYPE_LANG_SPECIFIC (NODE)->vec_new_uses_cookie)
/* Nonzero means that this _CLASSTYPE node defines ways of converting
itself to other types. */