This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13086] [3.3/3.4 regression] no error when calling delete on incomplete type, and no location
- From: "falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Nov 2003 17:51:15 -0000
- Subject: [Bug c++/13086] [3.3/3.4 regression] no error when calling delete on incomplete type, and no location
- References: <20031117165847.13086.akim@epita.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de 2003-11-17 17:51 -------
Subject: Re: [3.3/3.4 regression] no error when calling delete on incomplete type, and no location
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> Confirmed. There are at least two regressions here: up to
> 2.95 we issued the line of the code that tried to call operator delete,
> and we actually issued a hard error instead of a warning (I think
> I recall that a hard error is required).
I don't think it is. The standard says:
"If the object being deleted has incomplete class type at the point of
deletion and the complete class has a non-trivial destructor or a
deallocation function, the behavior is undefined."
which would be pointless if this was a hard error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13086