fntry1.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 32 行

C
32
字号
// Bug: g++ fails to treat function-try-blocks in ctors specially.// Submitted by Jason Merrill <jason@cygnus.com>int c;int r;struct A {  int i;  A(int j) { i = j; }  ~A() { c += i; }};struct B: public A {  A a;  B() try : A(1), a(2)    { throw 1; }  catch (...)    { if (c != 3) r |= 1; }};int main (){  try    { B b; }  catch (...)    { c = 0; }  if (c != 0) r |= 2;  return r;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?