More #include suggestions (PR c++/84269)
[official-gcc.git] / gcc / testsuite / g++.dg / plugin / pragma_plugin-test-1.C
blob3c084208b71c9fb8fc4e6dbd25a35382eba0c6fb
1 // { dg-warning "Callback to register pragmas" "" { target *-*-* } 0 }
3 int some_func (int c);
5 #pragma GCCPLUGIN sayhello "here" // { dg-warning "'pragma GCCPLUGIN sayhello' outside of function: here" }
7 int some_func (const char* s)
9 #pragma GCCPLUGIN sayhello "at start" // { dg-warning "'pragma GCCPLUGIN sayhello' from function 'some_func': at start" }
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;