1 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm64_32-apple-ios7.0 < /dev/null | FileCheck %s
2 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbv7k-apple-watchos2.0 < /dev/null | FileCheck %s
3 
4 // Check that the chosen types for things like size_t, ptrdiff_t etc are as
5 // expected
6 
7 // CHECK-NOT: #define _LP64 1
8 // CHECK-NOT: #define __AARCH_BIG_ENDIAN 1
9 // CHECK-NOT: #define __ARM_BIG_ENDIAN 1
10 // CHECK: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
11 // CHECK: #define __CHAR16_TYPE__ unsigned short
12 // CHECK: #define __CHAR32_TYPE__ unsigned int
13 // CHECK: #define __CHAR_BIT__ 8
14 // CHECK: #define __DBL_DENORM_MIN__ 4.9406564584124654e-324
15 // CHECK: #define __DBL_DIG__ 15
16 // CHECK: #define __DBL_EPSILON__ 2.2204460492503131e-16
17 // CHECK: #define __DBL_HAS_DENORM__ 1
18 // CHECK: #define __DBL_HAS_INFINITY__ 1
19 // CHECK: #define __DBL_HAS_QUIET_NAN__ 1
20 // CHECK: #define __DBL_MANT_DIG__ 53
21 // CHECK: #define __DBL_MAX_10_EXP__ 308
22 // CHECK: #define __DBL_MAX_EXP__ 1024
23 // CHECK: #define __DBL_MAX__ 1.7976931348623157e+308
24 // CHECK: #define __DBL_MIN_10_EXP__ (-307)
25 // CHECK: #define __DBL_MIN_EXP__ (-1021)
26 // CHECK: #define __DBL_MIN__ 2.2250738585072014e-308
27 // CHECK: #define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
28 // CHECK: #define __FLT_DENORM_MIN__ 1.40129846e-45F
29 // CHECK: #define __FLT_DIG__ 6
30 // CHECK: #define __FLT_EPSILON__ 1.19209290e-7F
31 // CHECK: #define __FLT_EVAL_METHOD__ 0
32 // CHECK: #define __FLT_HAS_DENORM__ 1
33 // CHECK: #define __FLT_HAS_INFINITY__ 1
34 // CHECK: #define __FLT_HAS_QUIET_NAN__ 1
35 // CHECK: #define __FLT_MANT_DIG__ 24
36 // CHECK: #define __FLT_MAX_10_EXP__ 38
37 // CHECK: #define __FLT_MAX_EXP__ 128
38 // CHECK: #define __FLT_MAX__ 3.40282347e+38F
39 // CHECK: #define __FLT_MIN_10_EXP__ (-37)
40 // CHECK: #define __FLT_MIN_EXP__ (-125)
41 // CHECK: #define __FLT_MIN__ 1.17549435e-38F
42 // CHECK: #define __FLT_RADIX__ 2
43 // CHECK: #define __INT16_C_SUFFIX__ {{$}}
44 // CHECK: #define __INT16_FMTd__ "hd"
45 // CHECK: #define __INT16_FMTi__ "hi"
46 // CHECK: #define __INT16_MAX__ 32767
47 // CHECK: #define __INT16_TYPE__ short
48 // CHECK: #define __INT32_C_SUFFIX__ {{$}}
49 // CHECK: #define __INT32_FMTd__ "d"
50 // CHECK: #define __INT32_FMTi__ "i"
51 // CHECK: #define __INT32_MAX__ 2147483647
52 // CHECK: #define __INT32_TYPE__ int
53 // CHECK: #define __INT64_C_SUFFIX__ LL
54 // CHECK: #define __INT64_FMTd__ "lld"
55 // CHECK: #define __INT64_FMTi__ "lli"
56 // CHECK: #define __INT64_MAX__ 9223372036854775807LL
57 // CHECK: #define __INT64_TYPE__ long long int
58 // CHECK: #define __INT8_C_SUFFIX__ {{$}}
59 // CHECK: #define __INT8_FMTd__ "hhd"
60 // CHECK: #define __INT8_FMTi__ "hhi"
61 // CHECK: #define __INT8_MAX__ 127
62 // CHECK: #define __INT8_TYPE__ signed char
63 // CHECK: #define __INTMAX_C_SUFFIX__ LL
64 // CHECK: #define __INTMAX_FMTd__ "lld"
65 // CHECK: #define __INTMAX_FMTi__ "lli"
66 // CHECK: #define __INTMAX_MAX__ 9223372036854775807LL
67 // CHECK: #define __INTMAX_TYPE__ long long int
68 // CHECK: #define __INTMAX_WIDTH__ 64
69 // CHECK: #define __INTPTR_FMTd__ "ld"
70 // CHECK: #define __INTPTR_FMTi__ "li"
71 // CHECK: #define __INTPTR_MAX__ 2147483647L
72 // CHECK: #define __INTPTR_TYPE__ long int
73 // CHECK: #define __INTPTR_WIDTH__ 32
74 // CHECK: #define __INT_FAST16_FMTd__ "hd"
75 // CHECK: #define __INT_FAST16_FMTi__ "hi"
76 // CHECK: #define __INT_FAST16_MAX__ 32767
77 // CHECK: #define __INT_FAST16_TYPE__ short
78 // CHECK: #define __INT_FAST32_FMTd__ "d"
79 // CHECK: #define __INT_FAST32_FMTi__ "i"
80 // CHECK: #define __INT_FAST32_MAX__ 2147483647
81 // CHECK: #define __INT_FAST32_TYPE__ int
82 // CHECK: #define __INT_FAST64_FMTd__ "lld"
83 // CHECK: #define __INT_FAST64_FMTi__ "lli"
84 // CHECK: #define __INT_FAST64_MAX__ 9223372036854775807LL
85 // CHECK: #define __INT_FAST64_TYPE__ long long int
86 // CHECK: #define __INT_FAST8_FMTd__ "hhd"
87 // CHECK: #define __INT_FAST8_FMTi__ "hhi"
88 // CHECK: #define __INT_FAST8_MAX__ 127
89 // CHECK: #define __INT_FAST8_TYPE__ signed char
90 // CHECK: #define __INT_LEAST16_FMTd__ "hd"
91 // CHECK: #define __INT_LEAST16_FMTi__ "hi"
92 // CHECK: #define __INT_LEAST16_MAX__ 32767
93 // CHECK: #define __INT_LEAST16_TYPE__ short
94 // CHECK: #define __INT_LEAST32_FMTd__ "d"
95 // CHECK: #define __INT_LEAST32_FMTi__ "i"
96 // CHECK: #define __INT_LEAST32_MAX__ 2147483647
97 // CHECK: #define __INT_LEAST32_TYPE__ int
98 // CHECK: #define __INT_LEAST64_FMTd__ "lld"
99 // CHECK: #define __INT_LEAST64_FMTi__ "lli"
100 // CHECK: #define __INT_LEAST64_MAX__ 9223372036854775807LL
101 // CHECK: #define __INT_LEAST64_TYPE__ long long int
102 // CHECK: #define __INT_LEAST8_FMTd__ "hhd"
103 // CHECK: #define __INT_LEAST8_FMTi__ "hhi"
104 // CHECK: #define __INT_LEAST8_MAX__ 127
105 // CHECK: #define __INT_LEAST8_TYPE__ signed char
106 // CHECK: #define __INT_MAX__ 2147483647
107 // CHECK: #define __LDBL_DENORM_MIN__  4.9406564584124654e-324L
108 // CHECK: #define __LDBL_DIG__ 15
109 // CHECK: #define __LDBL_EPSILON__ 2.2204460492503131e-16L
110 // CHECK: #define __LDBL_HAS_DENORM__ 1
111 // CHECK: #define __LDBL_HAS_INFINITY__ 1
112 // CHECK: #define __LDBL_HAS_QUIET_NAN__ 1
113 // CHECK: #define __LDBL_MANT_DIG__ 53
114 // CHECK: #define __LDBL_MAX_10_EXP__ 308
115 // CHECK: #define __LDBL_MAX_EXP__ 1024
116 // CHECK: #define __LDBL_MAX__ 1.7976931348623157e+308L
117 // CHECK: #define __LDBL_MIN_10_EXP__ (-307)
118 // CHECK: #define __LDBL_MIN_EXP__ (-1021)
119 // CHECK: #define __LDBL_MIN__ 2.2250738585072014e-308L
120 // CHECK: #define __LONG_LONG_MAX__ 9223372036854775807LL
121 // CHECK: #define __LONG_MAX__ 2147483647L
122 // CHECK: #define __POINTER_WIDTH__ 32
123 // CHECK: #define __PTRDIFF_TYPE__ long int
124 // CHECK: #define __PTRDIFF_WIDTH__ 32
125 // CHECK: #define __SCHAR_MAX__ 127
126 // CHECK: #define __SHRT_MAX__ 32767
127 // CHECK: #define __SIG_ATOMIC_MAX__ 2147483647
128 // CHECK: #define __SIG_ATOMIC_WIDTH__ 32
129 // CHECK: #define __SIZEOF_DOUBLE__ 8
130 // CHECK: #define __SIZEOF_FLOAT__ 4
131 // CHECK: #define __SIZEOF_INT__ 4
132 // CHECK: #define __SIZEOF_LONG_DOUBLE__ 8
133 // CHECK: #define __SIZEOF_LONG_LONG__ 8
134 // CHECK: #define __SIZEOF_LONG__ 4
135 // CHECK: #define __SIZEOF_POINTER__ 4
136 // CHECK: #define __SIZEOF_PTRDIFF_T__ 4
137 // CHECK: #define __SIZEOF_SHORT__ 2
138 // CHECK: #define __SIZEOF_SIZE_T__ 4
139 // CHECK: #define __SIZEOF_WCHAR_T__ 4
140 // CHECK: #define __SIZEOF_WINT_T__ 4
141 // CHECK: #define __SIZE_MAX__ 4294967295UL
142 // CHECK: #define __SIZE_TYPE__ long unsigned int
143 // CHECK: #define __SIZE_WIDTH__ 32
144 // CHECK: #define __UINT16_C_SUFFIX__ {{$}}
145 // CHECK: #define __UINT16_MAX__ 65535
146 // CHECK: #define __UINT16_TYPE__ unsigned short
147 // CHECK: #define __UINT32_C_SUFFIX__ U
148 // CHECK: #define __UINT32_MAX__ 4294967295U
149 // CHECK: #define __UINT32_TYPE__ unsigned int
150 // CHECK: #define __UINT64_C_SUFFIX__ ULL
151 // CHECK: #define __UINT64_MAX__ 18446744073709551615ULL
152 // CHECK: #define __UINT64_TYPE__ long long unsigned int
153 // CHECK: #define __UINT8_C_SUFFIX__ {{$}}
154 // CHECK: #define __UINT8_MAX__ 255
155 // CHECK: #define __UINT8_TYPE__ unsigned char
156 // CHECK: #define __UINTMAX_C_SUFFIX__ ULL
157 // CHECK: #define __UINTMAX_MAX__ 18446744073709551615ULL
158 // CHECK: #define __UINTMAX_TYPE__ long long unsigned int
159 // CHECK: #define __UINTMAX_WIDTH__ 64
160 // CHECK: #define __UINTPTR_MAX__ 4294967295UL
161 // CHECK: #define __UINTPTR_TYPE__ long unsigned int
162 // CHECK: #define __UINTPTR_WIDTH__ 32
163 // CHECK: #define __UINT_FAST16_MAX__ 65535
164 // CHECK: #define __UINT_FAST16_TYPE__ unsigned short
165 // CHECK: #define __UINT_FAST32_MAX__ 4294967295U
166 // CHECK: #define __UINT_FAST32_TYPE__ unsigned int
167 // CHECK: #define __UINT_FAST64_MAX__ 18446744073709551615UL
168 // CHECK: #define __UINT_FAST64_TYPE__ long long unsigned int
169 // CHECK: #define __UINT_FAST8_MAX__ 255
170 // CHECK: #define __UINT_FAST8_TYPE__ unsigned char
171 // CHECK: #define __UINT_LEAST16_MAX__ 65535
172 // CHECK: #define __UINT_LEAST16_TYPE__ unsigned short
173 // CHECK: #define __UINT_LEAST32_MAX__ 4294967295U
174 // CHECK: #define __UINT_LEAST32_TYPE__ unsigned int
175 // CHECK: #define __UINT_LEAST64_MAX__ 18446744073709551615UL
176 // CHECK: #define __UINT_LEAST64_TYPE__ long long unsigned int
177 // CHECK: #define __UINT_LEAST8_MAX__ 255
178 // CHECK: #define __UINT_LEAST8_TYPE__ unsigned char
179 // CHECK: #define __USER_LABEL_PREFIX__ _
180 // CHECK: #define __WCHAR_MAX__ 2147483647
181 // CHECK: #define __WCHAR_TYPE__ int
182 // CHECK-NOT: #define __WCHAR_UNSIGNED__ 1
183 // CHECK: #define __WCHAR_WIDTH__ 32
184 // CHECK: #define __WINT_TYPE__ int
185 // CHECK: #define __WINT_WIDTH__ 32
186