aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/has-feature.mm
blob: 77c76173bfb420efa11ab3f7b9a893c8951a41f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }

#define CXX11 (__cplusplus >= 201103L)

#if !__has_feature (objc_instancetype)
#error
#endif

#if !__has_feature (objc_default_synthesize_properties)
#error
#endif

// C features should not be available.
#if __has_extension (c_alignas) || __has_feature (c_alignof)
#error
#endif

// C++ features should be available (given the right standard).
#if __has_feature (cxx_constexpr) != CXX11
#error
#endif