delete2.c
来自「gcc3.2.1源代码」· C语言 代码 · 共 26 行
C
26 行
// Copyright (C) 1999 Free Software Foundation// by Alexandre Oliva <oliva@lsd.ic.unicamp.br>// distilled from bug report by Barry M. Caceres <barryc@itravelpartners.com>// Test whether dtors of vbases are called on delete[].extern "C" void abort();extern "C" void exit(int);struct Foo { ~Foo() { exit(0); }};struct Bar : virtual Foo {};int main() { delete [] new Bar[1]; abort();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?