https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85222
--- Comment #17 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 6 Apr 2018, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85222 > > --- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> --- > (In reply to Jakub Jelinek from comment #14) > > For the in-place transformation in libsupc++ if something catches the old > > failure and a new failure is thrown, is it possible? The other way around, > > if we would be throwing the new failure and catching the old one, doesn't > > seem to be possible, the cxx11 failure is bigger (32 bytes compared to 16 > > bytes for the old one). > > I must be misunderstanding the scenario you're describing, because to me it > seems like we could use 32 bytes to store a 16 byte object, but not the other > way around. > > Anyway, I think in-place transformations are not an option. Code could have > pointers to the data in the original exception. If we destroy it and create a > new object in the same location we invalidate those pointers. Yeah, I think throwing a composite object of both representation is the easiest way here (apart from the difficulty to build that in the first place).