]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/c2x-has-c-attribute-4.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / c2x-has-c-attribute-4.c
CommitLineData
1d00f8c8
JM
1/* Test __has_c_attribute. Test syntax errors. */
2/* { dg-do preprocess } */
3/* { dg-options "-std=c2x -pedantic-errors" } */
4
5#if __has_c_attribute /* { dg-error "missing '\\('" } */
6#endif
7
8#if __has_c_attribute 0 /* { dg-error "missing '\\('" } */
9#endif
10
11#if __has_c_attribute (0 /* { dg-error "requires an identifier" } */
12#endif
13
14#if __has_c_attribute (x /* { dg-error "missing '\\)'" } */
15#endif
16
17#if __has_c_attribute (x::0) /* { dg-error "required after scope" } */
18#endif