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