⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cleanup-3.c

📁 linux下编程用 编译软件
💻 C
字号:
/* { dg-do run } *//* { dg-options "" } *//* Verify that the cleanup handler receives the proper contents   of the variable.  */extern void exit(int);extern void abort(void);static int expected;static voidhandler(int *p){  if (*p != expected)    abort ();}static void __attribute__((noinline))bar(void){}static void doit(int x, int y){  int r __attribute__((cleanup (handler)));  if (x < y)    {      r = 0;      return;    }  bar();  r = x + y;}int main(){  expected = 0;  doit (1, 2);  expected = 3;  doit (2, 1);  return 0;}

⌨️ 快捷键说明

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