[PATCH] Adjust effective target selector to fix C++17 FAIL

Jonathan Wakely jwakely@redhat.com
Tue Jan 10 17:47:00 GMT 2017


This test using std::set_unexpected fails when run with -std=gnu++17
because throw() is no longer a dynamic exception specification and so
the unexpected handler no longer gets called. This tweaks the target
selector so it's only run for C++11 and C++14, where unexpected
handlers are usable (it can't be run for C++98 because it uses
std::rethrow_exception).

	* testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
	effective target selector to prevent running in C++17 mode.

Tested x86_64-linux with various -std options, committed to trunk.

-------------- next part --------------
commit ae39d3a49df4589e5f9a2dd6eff4518d0667cb53
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jan 10 17:35:27 2017 +0000

    Adjust effective target selector to fix C++17 FAIL
    
    	* testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
    	effective target selector to prevent running in C++17 mode.

diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index 3562892..97e3d57 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -1,4 +1,4 @@
-// { dg-do run { target c++11 } }
+// { dg-do run { target { c++11_only || c++14_only } } }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //


More information about the Gcc-patches mailing list