Debian Codegraph @

gcc/testsuite/g++.dg/plugin/pragma_plugin-test-1.C

raw
1 // { dg-warning "Callback to register pragmas" "" { target *-*-* } 0 }
2
3 int some_func (int c);
4
5 #pragma GCCPLUGIN sayhello "here" // { dg-warning "'pragma GCCPLUGIN sayhello' outside of function: here" }
6
7 int some_func (const char* s)
8 {
9 #pragma GCCPLUGIN sayhello "at start" // { dg-warning "'pragma GCCPLUGIN sayhello' from function 'some_func': at start" }
10
11 #define DO_PRAGMA(x) _Pragma(#x)
12 if (!s)
13 {
14 DO_PRAGMA(GCCPLUGIN sayhello "in block"); // { dg-warning "'pragma GCCPLUGIN sayhello' from function 'some_func': in block" }
15 return 0;
16 }
17 return 1;
18 }