900321_02.c
来自「xml大全 可读写调用率很高 xml大全 可读写调用率很高」· C语言 代码 · 共 29 行
C
29 行
// { dg-do run }// g++ 1.37.1 bug 900321_02// The following program exits with a nonzero status because the constructor// is not called 3 times as it should be. This program exits with a zero// status when compiled with cfront 2.0.// Cfront 2.0 passes this test.// keywords: arrays, initialization, default constructor, operator newint call_count = 0;struct struct0 { struct0 ();};struct0::struct0 () { call_count++; }typedef struct0 array[3]; // known dimensionint test (){ new array; return (call_count != 3);}int main () { return test (); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?