attrib4.c
来自「linux下编程用 编译软件」· C语言 代码 · 共 25 行
C
25 行
// { dg-do assemble }// { dg-options "-Wformat" }// Test that attributes are really applied to function declarations under// various conditions.// Contributed by Jason Merrill (jason@cygnus.com)#define PF __attribute__ ((format (printf, 1, 2)))struct A { static PF void f (char *, ...); friend PF void g (char *, ...); static void test ();};void PF h (char *, ...);void PF k (char *, ...) { }void A::test (){ f ("%f", 42); // { dg-warning "" } g ("%f", 42); // { dg-warning "" } h ("%f", 42); // { dg-warning "" } k ("%f", 42); // { dg-warning "" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?