std::rethrow_exception is broken
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Mon Mar 31 13:04:00 GMT 2014
Jonathan Wakely <jwakely@redhat.com> writes:
> On 25/03/14 17:25 +0000, Jonathan Wakely wrote:
>>Tested x86_64-linux, I plan to commit this to trunk soon.
>>
>
>>commit 06a845f80204947afd6866109db58cc85dc87117
>>Author: Jonathan Wakely <jwakely@redhat.com>
>>Date: Tue Mar 25 14:42:45 2014 +0000
>>
>> PR libstdc++/60612
>> * libsupc++/eh_ptr.cc: Assert __cxa_dependent_exception layout is
>> compatible with __cxa_exception.
>> * libsupc++/unwind-cxx.h (__cxa_dependent_exception): Add padding.
>> Fix typos in comments.
>> * testsuite/18_support/exception_ptr/60612-terminate.cc: New.
>> * testsuite/18_support/exception_ptr/60612-unexpected.cc: New.
>
> Committed to trunk.
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/6061
2-terminate.cc:26:27: error: '_Exit' was not declared in this scope
WARNING: 18_support/exception_ptr/60612-terminate.cc compilation failed to produ
ce executable
The following patch fixes this, following the idiom often used in the
libstdc++ testsuite.
Tested with the appropriate runtest invocation on
i386-pc-solaris2.{9,11}. Ok for mainline?
When looking into this, I noticed that this idiom is very widespread in
the v3 testsuite, but IMNSHO a *very bad* idea since it hides the fact
that many tests are acutually UNSUPPORTED, but appear to PASS, while the
only thing that passes is an empty main. I had something similar
recently when all C99 functionality in libstdc++ got disabled, but
testsuite results barely changed.
Unless someone strongly objects, I expect to change those tests to use
corresponding dg-require-* keywords to make mark them appropriately once
4.9 branches.
Rainer
2014-03-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/18_support/exception_ptr/60612-terminate.cc
(terminate, f): Wrap in _GLIBCXX_USE_C99.
* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-60612-noc99.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140331/734b9f77/attachment.bin>
-------------- next part --------------
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list