builtin1.c

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

C
27
字号
// Verify that if explicit prototype for builtin is present without throw(),// both the normal builtin and __builtin_* variant are expected to be// able to throw exceptions.// { dg-do compile }// { dg-options "-fdump-tree-eh" }extern "C" int printf (const char *, ...);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" 2 "eh" } } *//* { dg-final { cleanup-tree-dump "eh" } } */

⌨️ 快捷键说明

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