OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [c99-stdint-7.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Verify that the limits defined in <stdint.h> are those GCC expects
2
   internally to be defined and that they are usable in #if
3
   conditions.  */
4
/* { dg-do compile } */
5
/* { dg-options "-std=iso9899:1999 -fhosted" } */
6 490 jeremybenn
/* { dg-xfail-if "" { ! wchar } { "*" } { "" } } */
7 298 jeremybenn
 
8
#include <stdint.h>
9
 
10
/* Exact-width and pointer-holding types are optional.  */
11
#if defined(INT8_MIN) != defined(__INT8_TYPE__)
12
#error "Unexpected INT8_MIN definedness"
13
#endif
14
#if defined(INT8_MAX) != defined(__INT8_TYPE__)
15
#error "Unexpected INT8_MAX definedness"
16
#endif
17
#if defined(UINT8_MAX) != defined(__UINT8_TYPE__)
18
#error "Unexpected UINT8_MAX definedness"
19
#endif
20
#if defined(INT16_MIN) != defined(__INT16_TYPE__)
21
#error "Unexpected INT16_MIN definedness"
22
#endif
23
#if defined(INT16_MAX) != defined(__INT16_TYPE__)
24
#error "Unexpected INT16_MAX definedness"
25
#endif
26
#if defined(UINT16_MAX) != defined(__UINT16_TYPE__)
27
#error "Unexpected UINT16_MAX definedness"
28
#endif
29
#if defined(INT32_MIN) != defined(__INT32_TYPE__)
30
#error "Unexpected INT32_MIN definedness"
31
#endif
32
#if defined(INT32_MAX) != defined(__INT32_TYPE__)
33
#error "Unexpected INT32_MAX definedness"
34
#endif
35
#if defined(UINT32_MAX) != defined(__UINT32_TYPE__)
36
#error "Unexpected UINT32_MAX definedness"
37
#endif
38
#if defined(INT64_MIN) != defined(__INT64_TYPE__)
39
#error "Unexpected INT64_MIN definedness"
40
#endif
41
#if defined(INT64_MAX) != defined(__INT64_TYPE__)
42
#error "Unexpected INT64_MAX definedness"
43
#endif
44
#if defined(UINT64_MAX) != defined(__UINT64_TYPE__)
45
#error "Unexpected UINT64_MAX definedness"
46
#endif
47
#if defined(INTPTR_MIN) != defined(__INTPTR_TYPE__)
48
#error "Unexpected INTPTR_MIN definedness"
49
#endif
50
#if defined(INTPTR_MAX) != defined(__INTPTR_TYPE__)
51
#error "Unexpected INTPTR_MAX definedness"
52
#endif
53
#if defined(UINTPTR_MAX) != defined(__UINTPTR_TYPE__)
54
#error "Unexpected UINTPTR_MAX definedness"
55
#endif
56
 
57
#if defined(INT8_MIN) && INT8_MIN != -__INT8_MAX__-1
58
#error "INT8_MIN not usable in #if or wrong value"
59
#endif
60
#if defined(INT8_MAX) && INT8_MAX != __INT8_MAX__
61
#error "INT8_MAX not usable in #if or wrong value"
62
#endif
63
#if defined(UINT8_MAX) && UINT8_MAX != __UINT8_MAX__
64
#error "UINT8_MAX not usable in #if or wrong value"
65
#endif
66
#if defined(INT16_MIN) && INT16_MIN != -__INT16_MAX__-1
67
#error "INT16_MIN not usable in #if or wrong value"
68
#endif
69
#if defined(INT16_MAX) && INT16_MAX != __INT16_MAX__
70
#error "INT16_MAX not usable in #if or wrong value"
71
#endif
72
#if defined(UINT16_MAX) && UINT16_MAX != __UINT16_MAX__
73
#error "UINT16_MAX not usable in #if or wrong value"
74
#endif
75
#if defined(INT32_MIN) && INT32_MIN != -__INT32_MAX__-1
76
#error "INT32_MIN not usable in #if or wrong value"
77
#endif
78
#if defined(INT32_MAX) && INT32_MAX != __INT32_MAX__
79
#error "INT32_MAX not usable in #if or wrong value"
80
#endif
81
#if defined(UINT32_MAX) && UINT32_MAX != __UINT32_MAX__
82
#error "UINT32_MAX not usable in #if or wrong value"
83
#endif
84
#if defined(INT64_MIN) && INT64_MIN != -__INT64_MAX__-1
85
#error "INT64_MIN not usable in #if or wrong value"
86
#endif
87
#if defined(INT64_MAX) && INT64_MAX != __INT64_MAX__
88
#error "INT64_MAX not usable in #if or wrong value"
89
#endif
90
#if defined(UINT64_MAX) && UINT64_MAX != __UINT64_MAX__
91
#error "UINT64_MAX not usable in #if or wrong value"
92
#endif
93
 
94
#if INT_LEAST8_MIN != -__INT_LEAST8_MAX__-1
95
#error "INT_LEAST8_MIN not usable in #if or wrong value"
96
#endif
97
#if INT_LEAST8_MAX != __INT_LEAST8_MAX__
98
#error "INT_LEAST8_MAX not usable in #if or wrong value"
99
#endif
100
#if UINT_LEAST8_MAX != __UINT_LEAST8_MAX__
101
#error "UINT_LEAST8_MAX not usable in #if or wrong value"
102
#endif
103
#if INT_LEAST16_MIN != -__INT_LEAST16_MAX__-1
104
#error "INT_LEAST16_MIN not usable in #if or wrong value"
105
#endif
106
#if INT_LEAST16_MAX != __INT_LEAST16_MAX__
107
#error "INT_LEAST16_MAX not usable in #if or wrong value"
108
#endif
109
#if UINT_LEAST16_MAX != __UINT_LEAST16_MAX__
110
#error "UINT_LEAST16_MAX not usable in #if or wrong value"
111
#endif
112
#if INT_LEAST32_MIN != -__INT_LEAST32_MAX__-1
113
#error "INT_LEAST32_MIN not usable in #if or wrong value"
114
#endif
115
#if INT_LEAST32_MAX != __INT_LEAST32_MAX__
116
#error "INT_LEAST32_MAX not usable in #if or wrong value"
117
#endif
118
#if UINT_LEAST32_MAX != __UINT_LEAST32_MAX__
119
#error "UINT_LEAST32_MAX not usable in #if or wrong value"
120
#endif
121
#if INT_LEAST64_MIN != -__INT_LEAST64_MAX__-1
122
#error "INT_LEAST64_MIN not usable in #if or wrong value"
123
#endif
124
#if INT_LEAST64_MAX != __INT_LEAST64_MAX__
125
#error "INT_LEAST64_MAX not usable in #if or wrong value"
126
#endif
127
#if UINT_LEAST64_MAX != __UINT_LEAST64_MAX__
128
#error "UINT_LEAST64_MAX not usable in #if or wrong value"
129
#endif
130
 
131
#if INT_FAST8_MIN != -__INT_FAST8_MAX__-1
132
#error "INT_FAST8_MIN not usable in #if or wrong value"
133
#endif
134
#if INT_FAST8_MAX != __INT_FAST8_MAX__
135
#error "INT_FAST8_MAX not usable in #if or wrong value"
136
#endif
137
#if UINT_FAST8_MAX != __UINT_FAST8_MAX__
138
#error "UINT_FAST8_MAX not usable in #if or wrong value"
139
#endif
140
#if INT_FAST16_MIN != -__INT_FAST16_MAX__-1
141
#error "INT_FAST16_MIN not usable in #if or wrong value"
142
#endif
143
#if INT_FAST16_MAX != __INT_FAST16_MAX__
144
#error "INT_FAST16_MAX not usable in #if or wrong value"
145
#endif
146
#if UINT_FAST16_MAX != __UINT_FAST16_MAX__
147
#error "UINT_FAST16_MAX not usable in #if or wrong value"
148
#endif
149
#if INT_FAST32_MIN != -__INT_FAST32_MAX__-1
150
#error "INT_FAST32_MIN not usable in #if or wrong value"
151
#endif
152
#if INT_FAST32_MAX != __INT_FAST32_MAX__
153
#error "INT_FAST32_MAX not usable in #if or wrong value"
154
#endif
155
#if UINT_FAST32_MAX != __UINT_FAST32_MAX__
156
#error "UINT_FAST32_MAX not usable in #if or wrong value"
157
#endif
158
#if INT_FAST64_MIN != -__INT_FAST64_MAX__-1
159
#error "INT_FAST64_MIN not usable in #if or wrong value"
160
#endif
161
#if INT_FAST64_MAX != __INT_FAST64_MAX__
162
#error "INT_FAST64_MAX not usable in #if or wrong value"
163
#endif
164
#if UINT_FAST64_MAX != __UINT_FAST64_MAX__
165
#error "UINT_FAST64_MAX not usable in #if or wrong value"
166
#endif
167
 
168
#if defined(INTPTR_MIN) && INTPTR_MIN != -__INTPTR_MAX__-1
169
#error "INTPTR_MIN not usable in #if or wrong value"
170
#endif
171
#if defined(INTPTR_MAX) && INTPTR_MAX != __INTPTR_MAX__
172
#error "INTPTR_MAX not usable in #if or wrong value"
173
#endif
174
#if defined(UINTPTR_MAX) && UINTPTR_MAX != __UINTPTR_MAX__
175
#error "UINTPTR_MAX not usable in #if or wrong value"
176
#endif
177
 
178
#if INTMAX_MIN != -__INTMAX_MAX__-1
179
#error "INTMAX_MIN not usable in #if or wrong value"
180
#endif
181
#if INTMAX_MAX != __INTMAX_MAX__
182
#error "INTMAX_MAX not usable in #if or wrong value"
183
#endif
184
#if UINTMAX_MAX != __UINTMAX_MAX__
185
#error "UINTMAX_MAX not usable in #if or wrong value"
186
#endif
187
 
188
#if PTRDIFF_MIN != -__PTRDIFF_MAX__-1
189
#error "PTRDIFF_MIN not usable in #if or wrong value"
190
#endif
191
#if PTRDIFF_MAX != __PTRDIFF_MAX__
192
#error "PTRDIFF_MAX not usable in #if or wrong value"
193
#endif
194
 
195
#if SIG_ATOMIC_MIN != __SIG_ATOMIC_MIN__
196
#error "SIG_ATOMIC_MIN not usable in #if or wrong value"
197
#endif
198
#if SIG_ATOMIC_MAX != __SIG_ATOMIC_MAX__
199
#error "SIG_ATOMIC_MAX not usable in #if or wrong value"
200
#endif
201
 
202
#if SIZE_MAX != __SIZE_MAX__
203
#error "SIZE_MAX not usable in #if or wrong value"
204
#endif
205
 
206
#if WCHAR_MIN != __WCHAR_MIN__
207
#error "WCHAR_MIN not usable in #if or wrong value"
208
#endif
209
#if WCHAR_MAX != __WCHAR_MAX__
210
#error "WCHAR_MAX not usable in #if or wrong value"
211
#endif
212
 
213
#if WINT_MIN != __WINT_MIN__
214
#error "WINT_MIN not usable in #if or wrong value"
215
#endif
216
#if WINT_MAX != __WINT_MAX__
217
#error "WINT_MAX not usable in #if or wrong value"
218
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.