[Bug c++/3187] gcc lays down two copies of constructors

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 19 10:06:00 GMT 2012


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

--- Comment #41 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-19 10:05:55 UTC ---
The reason why this hasn't been closed is that we only use an alias of one kind
of ctor (resp. dtor) to the other one if they are the same (and for deleting
dtor just always call the other dtor).  If they are different, then they can't
be aliased together, what we could do (perhaps as an option) is to emit another
function, which would take an argument what kind of ctor resp. dtor it is, and
behave differently depending on that argument, then have both kinds of ctor
resp. dtor to tail call (or if not possible, just call) the other function.
I guess it could have ABI consequences though (in which comdat section to place
it).



More information about the Gcc-bugs mailing list