2 typedef signed char schar
;
3 typedef unsigned char uchar
;
4 typedef unsigned short ushort
;
5 typedef unsigned int uint
;
6 typedef unsigned long ulong
;
7 typedef long long longlong
;
8 typedef unsigned long long ulonglong
;
12 #define DEFINE_CAST(from, to) \
13 static to from##2##to(from x) { \
17 #define DEFINE_CASTS(from) \
18 DEFINE_CAST(from, bool) \
19 DEFINE_CAST(from, char) \
20 DEFINE_CAST(from, schar) \
21 DEFINE_CAST(from, uchar) \
22 DEFINE_CAST(from, short) \
23 DEFINE_CAST(from, ushort) \
24 DEFINE_CAST(from, int) \
25 DEFINE_CAST(from, uint) \
26 DEFINE_CAST(from, long) \
27 DEFINE_CAST(from, ulong) \
28 DEFINE_CAST(from, longlong) \
29 DEFINE_CAST(from, ulonglong) \
30 DEFINE_CAST(from, float) \
31 DEFINE_CAST(from, double)
43 DEFINE_CASTS(longlong
)
44 DEFINE_CASTS(ulonglong
)
48 DEFINE_CAST(long, vptr
)
49 DEFINE_CAST(long, iptr
)
50 DEFINE_CAST(vptr
, long)
51 DEFINE_CAST(iptr
, long)
52 DEFINE_CAST(int, vptr
)
53 DEFINE_CAST(vptr
, int)
56 * check-name: Cast code generation
57 * check-command: sparsec -c $file -o tmp.o