]> andersk Git - splint.git/blame - test/union.pp
noexpand always false.
[splint.git] / test / union.pp
CommitLineData
80ee600a 1# 1 "union.c"
2typedef union _ut
3{
4 int x;
5 int y;
6 int *ox;
7 int *dx;
8 struct { int a; int b; int *ip; } st;
9} *ut;
10
11extern void *smalloc (size_t);
12
13ut ut_create1 ( int a)
14{
15 ut u = (ut) smalloc (sizeof (*u));
16
17 return u;
18}
19
20ut ut_create2 (int a)
21{
22 ut u = (ut) smalloc (sizeof (*u));
23
24 u->x = a;
25 return u;
26}
27
28ut ut_create3 (int a)
29{
30 ut u = (ut) smalloc (sizeof (*u));
31
32 u->x = a;
33 u->y = a;
34 return u;
35}
36
37ut ut_create4 (int *t)
38{
39 ut u = (ut) smalloc (sizeof (*u));
40
41 u->ox = t;
42 return u;
43}
44
45ut ut_create5 (int *t)
46{
47 ut u = (ut) smalloc (sizeof (*u));
48
49 u->dx = t;
50 return u;
51}
52
53ut ut_create6 (void)
54{
55 ut u = (ut) smalloc (sizeof (*u));
56
57 u->st.a = 3;
58 return u;
59}
60
61ut ut_create7 (int *p)
62{
63 ut u = (ut) smalloc (sizeof (*u));
64
65 u->st.a = 3;
66 u->st.b = 4;
67 u->st.ip = p;
68 return u;
69}
70
71void ut_mangle1 (ut u)
72{
73 free (u->ox);
74}
75
76void ut_mangle2 (ut u)
77{
78 free (u->st.ip);
79}
80
81void ut_mangle3 (ut u)
82{
83 free (u->st.ip);
84 u->x = 3;
85}
This page took 4.887328 seconds and 5 git commands to generate.