aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/has-feature-pedantic.c
blob: 4ac16a4ed8a3a9140266a88c9e22e8381b25d947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-additional-options "-pedantic-errors" } */

/* When -pedantic-errors is passed, __has_extension should behave like
   __has_feature.  */

#if __has_feature (gnu_asm_goto_with_outputs)
#error extension recognized as feature
#endif

#if __has_extension (gnu_asm_goto_with_outputs)
#error pure extensions should not be recognized with -pedantic-errors
#endif

#if !__has_feature (tls) || !__has_extension (tls)
#error features should still be recognized with -pedantic-errors
#endif

/* Make this TU non-empty to appease -pedantic-errors.  */
int foo;