gcc/testsuite/gcc.dg/cpp/20000529-1.c
raw| 1 | /* Regression test for bug with macro expansion on #if lines - |
| 2 | exposed by glibc. */ |
| 3 | /* { dg-do compile } */ |
| 4 | |
| 5 | # define SHLIB_COMPAT(lib, introduced, obsoleted) \ |
| 6 | (!(ABI_##lib##_##obsoleted - 0) \ |
| 7 | || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))) |
| 8 | |
| 9 | #if 0 |
| 10 | bad |
| 11 | #elif SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) |
| 12 | int |
| 13 | #endif |
| 14 | x; |