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

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Wed Nov 19 04:36:00 GMT 2003


------- Additional Comments From gdr at integrable-solutions dot net  2003-11-19 04:36 -------
Subject: Re:  [3.3/3.4 regression] no error when calling delete on incomplete type, and no location

"falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla@gcc.gnu.org> writes:

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


But GCC can decide to define that behaviour to be hard error.

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.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13086



More information about the Gcc-bugs mailing list