| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-pedantic-errors" } */ |
| 3 |
|
| 4 |
/* When -pedantic-errors is passed, __has_extension should behave like |
| 5 |
__has_feature. */ |
| 6 |
|
| 7 |
#if __has_feature (gnu_asm_goto_with_outputs) |
| 8 |
#error extension recognized as feature |
| 9 |
#endif |
| 10 |
|
| 11 |
#if __has_extension (gnu_asm_goto_with_outputs) |
| 12 |
#error pure extensions should not be recognized with -pedantic-errors |
| 13 |
#endif |
| 14 |
|
| 15 |
#if !__has_feature (tls) || !__has_extension (tls) |
| 16 |
#error features should still be recognized with -pedantic-errors |
| 17 |
#endif |
| 18 |
|
| 19 |
/* Make this TU non-empty to appease -pedantic-errors. */ |
| 20 |
int foo; |