This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs allows deletion of const objects.
Alexandre Oliva wrote:
> This shouldn't make any difference, from the point of view of
> `delete'. Constness does not affect the ability to delete.
Hmm, now *I'm* confused. I distincly remember gcc (2.7.2.1) complaining
about deleting a pointer with a const involved (thinking about it
further, my previous post was bogus, otherwise you can't delete objects
via a reference variable). Is this a relatively recent change in the
C++ standard? To me, it just doesn't make sense being allowed to delete
a constant object because const is meant to be a promise that the object
will not be modified, and deleting an object definitly modifies it!
Bill
--
Leave others their otherness