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] the location of the warning message is wrong when calling delete on incomplete type
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Nov 2003 09:56:26 -0000
- Subject: [Bug c++/13086] [3.3/3.4 regression] the location of the warning message is wrong when calling delete on incomplete type
- References: <20031117165847.13086.akim@epita.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk at debian dot org 2003-11-19 09:56 -------
(In reply to comment #6)
> "falk dot hueffner at student dot uni-tuebingen dot de"
<gcc-bugzilla@gcc.gnu.org> writes:
>
> | "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.
>
> But GCC can decide to define that behaviour to be hard error.
Only if both conditions are given. The object here has incomplete class,
but it does not have a destructor (well, not shown above, but let's assume.).
> I believe I discussed -- a while ago -- this specific issue with Jason,
Alexandre Oliva.
> I argued that the compiler should issue a hard error. I was in minority :-(
>
> I still think, this should be a hard error.
I wouldn't mind at all if it was, because this is a completely useless
feature which could potentially do some damage, but I think it would not be
standard compliant.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13086