]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Make testsuite usable with -fno-exceptions
authorJonathan Wakely <jwakely@redhat.com>
Thu, 30 Jul 2020 11:23:54 +0000 (12:23 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:15 +0000 (13:20 -0300)
commit0310316c99c80f62bf636dd097da18c3e1e7a5fc
tree8bfd5dd90969369a54cbadccbf7dc418adb9e022
parenta6de1ede79aa371d6f44b5a219962cf6f91f4f52
libstdc++: Make testsuite usable with -fno-exceptions

Previously it was not possible to add -fno-exceptions to the testsuite
flags, because some files that are compiled by the v3-build_support
procedure failed with exceptions disabled.

This adjusts those files to still compile without exceptions (with
degraded functionality in some cases).

The sole testcase that explicitly checks for -fno-exceptions has also
been adjusted to use the more robust exceptions_enabled effective-target
keyword from gcc/testsuite/lib/target-supports.exp.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/vector/bool/72847.cc: Use the
exceptions_enabled effective-target keyword instead of
checking for an explicit -fno-exceptions option.
* testsuite/util/testsuite_abi.cc (examine_symbol): Remove
redundant try-catch.
* testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
Do not define check_allocate_max_size and memory_resource.
* testsuite/util/testsuite_containers.h: Replace comment with
#error if wrong standard dialect used.
* testsuite/util/testsuite_shared.cc: Likewise.
libstdc++-v3/testsuite/23_containers/vector/bool/72847.cc
libstdc++-v3/testsuite/util/testsuite_abi.cc
libstdc++-v3/testsuite/util/testsuite_allocator.h
libstdc++-v3/testsuite/util/testsuite_containers.h
libstdc++-v3/testsuite/util/testsuite_shared.cc