]> andersk Git - splint.git/blame - test/ullint.c
noexpand always false.
[splint.git] / test / ullint.c
CommitLineData
80ee600a 1/*
2** This test provided by Jim Zelenka
3*/
4
5typedef unsigned long pan_uint32_t;
6typedef long long pan_int64_t;
7typedef unsigned long long pan_uint64_t;
8
9struct t_s {
10 pan_uint32_t w;
11 pan_uint32_t x;
12};
13
14int
15main (/*@unused@*/ int argc,
16 /*@unused@*/ char **argv)
17{
18 unsigned char c, *src, _src[6];
19 pan_uint32_t d, ui32;
20 pan_uint64_t e;
21 struct t_s st2;
22 int i;
23
24 c = 0x01; /* Error without +charintliteral or +charint */
25
26 st2.w = 1;
27 st2.x = 2;
28
29 for(i=0;i<sizeof(src);i++) { /* Error for i < sizeof */
30 _src[i] = (unsigned char)i;
31 }
32
33 src = _src;
34
35 ui32 = (pan_uint32_t)((src[0] ^ 0xFC) << 30) | ((src[1] ^ 0x80) << 24) | ((src[2] ^ 0x80) << 18) | ((src[3] ^ 0x80) << 12) | ((src[4] ^ 0x80) << 6) | (src[5] ^ 0x80);
36
37 d = c;
38
39 e = st2.w + (st2.x * 1000000000);
40
41 exit(0);
42}
This page took 0.122559 seconds and 5 git commands to generate.