gcc/testsuite/g++.dg/modules/dir-only-1.C
raw| 1 | // { dg-do preprocess } |
| 2 | // { dg-additional-options -fdirectives-only } |
| 3 | |
| 4 | #define major NO NOT ME |
| 5 | |
| 6 | #ifdef major |
| 7 | # undef major |
| 8 | #else |
| 9 | # error major not initially defined |
| 10 | #endif |
| 11 | |
| 12 | #ifdef major |
| 13 | # error major still defined |
| 14 | #endif |
| 15 | |
| 16 | // { dg-final { scan-file dir-only-1.i "#undef major\n" } } |