Re: std::rethrow_exception is broken

2014-03-31 Thread Jonathan Wakely
On 31/03/14 19:17 +0100, Jonathan Wakely wrote: This improves the static assertion messages, as suggested by François and Daniel. Tested x86_64-linux, committed to trunk. Oops, apparently mutt doesn't attach attachments until you actually send the mail, by which time the file I was attaching h

Re: std::rethrow_exception is broken

2014-03-31 Thread Jonathan Wakely
On 29/03/14 19:55 +0100, Daniel Krügler wrote: 2014-03-28 13:37 GMT+01:00 Jonathan Wakely : On 27/03/14 23:00 +0100, Daniel Krügler wrote: I'm in favour for changing it, what about something like "layout mismatch" ? How about this? "__cxa_dependent_exception::termHandler layout must be cons

Re: std::rethrow_exception is broken

2014-03-31 Thread Rainer Orth
Hi Jonathan, > On 31/03/14 14:13 +0200, Rainer Orth wrote: >> >>Unfortunately, the new tests FAIL on non-C99 targets (i386-pc-solaris2.9 >>in my case): >> >>FAIL: 18_support/exception_ptr/60612-terminate.cc (test for excess errors) >>Excess errors: >>/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsu

Re: std::rethrow_exception is broken

2014-03-31 Thread Jonathan Wakely
On 31/03/14 14:13 +0200, Rainer Orth wrote: Unfortunately, the new tests FAIL on non-C99 targets (i386-pc-solaris2.9 in my case): FAIL: 18_support/exception_ptr/60612-terminate.cc (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/18_support/exception_ptr

Re: std::rethrow_exception is broken

2014-03-31 Thread Rainer Orth
Jonathan Wakely writes: > On 25/03/14 17:25 +, Jonathan Wakely wrote: >>Tested x86_64-linux, I plan to commit this to trunk soon. >> > >>commit 06a845f80204947afd6866109db58cc85dc87117 >>Author: Jonathan Wakely >>Date: Tue Mar 25 14:42:45 2014 + >> >> PR libstdc++/60612 >> *

Re: std::rethrow_exception is broken

2014-03-27 Thread Jonathan Wakely
On 25/03/14 17:25 +, Jonathan Wakely wrote: Tested x86_64-linux, I plan to commit this to trunk soon. commit 06a845f80204947afd6866109db58cc85dc87117 Author: Jonathan Wakely Date: Tue Mar 25 14:42:45 2014 + PR libstdc++/60612 * libsupc++/eh_ptr.cc: Assert __cxa_dep

Re: std::rethrow_exception is broken

2014-03-25 Thread Jonathan Wakely
On 24/03/14 19:19 +, Jonathan Wakely wrote: There is a lot of code in libsupc++/eh_* that relies on __cxa_exception and __cxa_dependent_exception having similar layouts, so tricks like this work: static inline void* __gxx_caught_object(_Unwind_Exception* eo) { // Bad as it looks, this actua

std::rethrow_exception is broken

2014-03-24 Thread Jonathan Wakely
There is a lot of code in libsupc++/eh_* that relies on __cxa_exception and __cxa_dependent_exception having similar layouts, so tricks like this work: static inline void* __gxx_caught_object(_Unwind_Exception* eo) { // Bad as it looks, this actually works for dependent exceptions too. __cxa_e