📄 filter2.c
字号:
// Test that terminate gets run when a catch filter fails to match while// running destructors. Original bug depended on a::~a being inlined.// { dg-do run }// { dg-options -O }#include <exception>#include <cstdlib>struct e1 {};struct e2 {};struct a{ a () { } ~a () { try { throw e1(); } catch (e2 &) { } }};voidex_test (){ a aa; try { throw e1 (); } catch (e2 &) { }}void my_terminate (){ std::exit (0);}intmain (){ std::set_terminate (my_terminate); try { ex_test (); } catch (...) { } abort ();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -