https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22377
Andrew Pinski changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
--- Comment #6 from tromey at gcc dot gnu dot org 2009-02-22 17:04 ---
I'm not sure that suggestion will work.
My recollection is that the order of checks is specified,
and that allocating memory before the abstract-ness check
would be incorrect.
I didn't confirm this with the spec thoug
--- Comment #5 from bonzini at gnu dot org 2009-02-16 09:23 ---
Just came here by chance :-)
You can check "if (this.class == ...)" in the constructor. It will slow down
constructors for subclasses though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22377
--- Comment #4 from tromey at gcc dot gnu dot org 2006-03-07 15:16 ---
Now I think the idea in comment #3 is incorrect.
I looked at implementing it today, and I realized that
it will also cause a super() constructor call to
throw an exception.
The idea in comment #1 may still work. I'd
--- Comment #3 from tromey at gcc dot gnu dot org 2006-02-07 18:43 ---
Andrew pointed out on irc that we could also implement this by
installing a pointer to a "constructor" which would simply throw
the appropriate exception.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22377
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11
16:26 ---
Confirmed.
--
What|Removed |Added
Status|UNCONFIRMED |NEW
E
--- Additional Comments From mckinlay at redhat dot com 2005-07-11 15:44
---
There might be a way to implement this without additional _Jv_AllocObject cost
and without adding new ABI tables.
If abstract classes and interfaces were given a zero or negative value in their
size field, I t