]> andersk Git - splint.git/blame - test/tests2.2/arbints.c
Fixed \ line parsing.
[splint.git] / test / tests2.2 / arbints.c
CommitLineData
885824d3 1typedef /*@integraltype@*/ a_int;
2typedef /*@unsignedintegraltype@*/ u_int;
3typedef /*@signedintegraltype@*/ s_int;
4
5int f (a_int a, u_int u, s_int s)
6{
7 unsigned long ul;
8 long l;
9
10 printf ("the values are: %d %ld %ud", a, u, s); /* expect 3 errors */
11 ul = a; /* Assignment of a_int to unsigned long int: ul = a */
12
13 /*@+longunsignedintegral@*/
14 ul = a;
15
16 /*@+longintegral@*/
17 ul = a;
18
19 if (u == a) printf ("yo!");
20
21 /*@+matchanyintegral@*/
22 if (u == l) printf ("yo!");
23 if (u == a) printf ("yo!");
24 /*@=matchanyintegral@*/
25
26 /*@+longsignedintegral@*/
27 printf ("i'm okay: %ld", s);
28
29 /*@+longunsignedunsignedintegral@*/
30 printf ("you're not! %ld", u);
31 printf ("you're not! %ud", u);
32
33 return a;
34}
This page took 0.218824 seconds and 5 git commands to generate.