gcc/testsuite/c-c++-common/cpp/diagnostic-poison.c
raw| 1 | /* PR preprocessor/36887 */ |
| 2 | /* { dg-do preprocess } */ |
| 3 | |
| 4 | #ifdef LEVEL2 |
| 5 | /* Test that we get the include traced location as well. */ |
| 6 | #pragma GCC poison p1 /* { dg-note "poisoned here" } */ |
| 7 | #else |
| 8 | #define LEVEL2 |
| 9 | #include "diagnostic-poison.c" |
| 10 | int p1; /* { dg-error "attempt to use poisoned" } */ |
| 11 | _Pragma("GCC poison p2") /* { dg-note "poisoned here" } */ |
| 12 | int p2; /* { dg-error "attempt to use poisoned" } */ |
| 13 | #endif |