diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-10-23 15:03:38 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-10-23 15:03:38 +0100 |
commit | b66b30a807918ee1cf89b3376bb410b9046639b8 (patch) | |
tree | 77dd2f334e1c360895cacc35ef91ceb6828016a5 /gcc/gcov.c | |
parent | 50106208ff65fe8076329169cd97460a03e27388 (diff) | |
download | gcc-b66b30a807918ee1cf89b3376bb410b9046639b8.zip gcc-b66b30a807918ee1cf89b3376bb410b9046639b8.tar.gz gcc-b66b30a807918ee1cf89b3376bb410b9046639b8.tar.bz2 |
testsuite: Add noexcept(false) to throwing destructor
I think this test is intended to check this property of the C++
standard:
"If a destructor directly invoked by stack unwinding exits via an
exception, std::terminate is invoked." [except.throw]
Since C++11 any exception escaping a destructor will call
std::terminate, so the test would terminate even if the unwinding
behaviour was wrong.
Give the destructor a potentially-throwing exception specification,
so that we know that terminate was called for the right reason.
gcc/testsuite/ChangeLog:
* g++.dg/compat/eh/filter2_y.C: Add noexcept(false) to
destructor.
Diffstat (limited to 'gcc/gcov.c')
0 files changed, 0 insertions, 0 deletions