builtin2.c

来自「用于进行gcc测试」· C语言 代码 · 共 26 行

C
26
字号
// Verify that if explicit prototype for builtin is present with throw(),// neither the normal builtin nor __builtin_* variant can throw exceptions.// { dg-do compile }// { dg-options "-fdump-tree-eh" }extern "C" int printf (const char *, ...) throw();struct A { A (); ~A (); int i; };intfoo (){  A a;  printf ("foo %d\n", a.i);}intbar (){  A a;  __builtin_printf ("foo %d\n", a.i);}/* { dg-final { scan-tree-dump-times "resx 1" 0 "eh" } } *//* { dg-final { cleanup-tree-dump "eh" } } */

⌨️ 快捷键说明

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