This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13086] [3.3/3.4 regression] the location of the warning message is wrong when calling delete on incomplete type


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]