Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-has-c-attribute-4.c
blob72e7ee3d34bc47bddaffec20b5988f5c13ecb77a
1 /* Test __has_c_attribute. Test syntax errors. */
2 /* { dg-do preprocess } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
5 #if __has_c_attribute /* { dg-error "missing '\\('" } */
6 #endif
8 #if __has_c_attribute 0 /* { dg-error "missing '\\('" } */
9 #endif
11 #if __has_c_attribute (0 /* { dg-error "requires an identifier" } */
12 #endif
14 #if __has_c_attribute (x /* { dg-error "missing '\\)'" } */
15 #endif
17 #if __has_c_attribute (x::0) /* { dg-error "required after scope" } */
18 #endif