blob: b0adeaa4227450e0ca3d71f524b68bb88f7443a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Test __has_c_attribute. Test basic properties. */
/* { dg-do preprocess } */
/* { dg-options "-std=c23 -pedantic-errors" } */
#ifdef __has_c_attribute
/* OK. */
#else
#error "__has_c_attribute not defined"
#endif
#ifndef __has_c_attribute
#error "__has_c_attribute not defined"
#endif
#if defined __has_c_attribute
/* OK. */
#else
#error "__has_c_attribute not defined"
#endif
#if __has_c_attribute(foo)
#error "foo attribute supported"
#endif
#if 0
#elif __has_c_attribute(foo)
#error "foo attribute supported"
#endif
|