Debian Codegraph @

gcc/testsuite/objc.dg/has-feature.m

raw
1 /* { dg-do compile } */
2
3 #define HAVE_C11 (__STDC_VERSION__ >= 201112L)
4
5 #if !__has_feature (objc_instancetype)
6 #error
7 #endif
8
9 #if !__has_feature (objc_default_synthesize_properties)
10 #error
11 #endif
12
13 /* C features should be available as extensions. */
14 #if !__has_extension (c_alignas)
15 #error
16 #endif
17
18 /* And as features given the appropriate C standard. */
19 #if __has_feature (c_alignas) != HAVE_C11
20 #error
21 #endif
22
23 /* Shouldn't have C++ features even as extensions. */
24 #if __has_feature (cxx_constexpr) || __has_extension (cxx_constexpr)
25 #error
26 #endif