2 typedef unsigned char uchar
;
3 typedef unsigned short ushort
;
4 typedef unsigned int uint
;
5 typedef unsigned long ulong
;
6 typedef long long longlong
;
7 typedef unsigned long long ulonglong
;
9 #define DEFINE_CAST(from, to) \
10 static to from##2##to(from x) { \
14 #define DEFINE_CASTS(from) \
15 DEFINE_CAST(from, bool) \
16 DEFINE_CAST(from, char) \
17 DEFINE_CAST(from, uchar) \
18 DEFINE_CAST(from, short) \
19 DEFINE_CAST(from, ushort) \
20 DEFINE_CAST(from, int) \
21 DEFINE_CAST(from, uint) \
22 DEFINE_CAST(from, long) \
23 DEFINE_CAST(from, ulong) \
24 DEFINE_CAST(from, longlong) \
25 DEFINE_CAST(from, ulonglong) \
27 DEFINE_CAST(from, float) \
28 DEFINE_CAST(from, double)
40 DEFINE_CASTS(longlong
)
41 DEFINE_CASTS(ulonglong
)
48 * check-name: Cast code generation
49 * check-command: ./sparsec -c $file -o tmp.o