diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-07-19 04:27:16 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-07-19 04:27:16 +0000 |
commit | dbc957f103982bd3d8cb973beb26439d4e99ad8c (patch) | |
tree | 55d1f67ed10772a2950b1029d8cfb2d9fe75bb8e /gcc/cp/NEWS | |
parent | 8458e9540166e45e4e9501cf2ae5a9aeb49b1468 (diff) | |
download | gcc-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/NEWS')
-rw-r--r-- | gcc/cp/NEWS | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/cp/NEWS b/gcc/cp/NEWS index 966572c..69b6fb4 100644 --- a/gcc/cp/NEWS +++ b/gcc/cp/NEWS @@ -1,5 +1,41 @@ *** Changes in GCC 3.1: +* The C++ ABI has been changed to correctly handle this code: + + struct A { + void operator delete[] (void *, size_t); + }; + + struct B : public A { + }; + + new B[10]; + + The amount of storage allocated for the array will be greater than + it was in 3.0, in order to store the number of elements in the + array, so that the correct size can be passed to `operator delete[]' + when the array is deleted. Previously, the value passed to + `operator delete[]' was unpredictable. + + This change will only affect code that declares a two-argument + `operator delete[]' with a second parameter of type `size_t' + in a base class, and does not override that definition in a + derived class. + +* The C++ ABI has been changed so that: + + struct A { + void operator delete[] (void *, size_t); + void operator delete[] (void *); + }; + + does not cause unncessary storage to be allocated when an array of + `A' objects is allocated. + + This change will only affect code that declares both of these + forms of `operator delete[]', and declared the two-argument form + before the one-argument form. + *** Changes in GCC 3.0: * Support for guiding declarations has been removed. |