1: main()
2: {
3: short s;
4: int i;
5: long l;
6: float f;
7: char *p;
8:
9: s = "s = ..."; /* $L4 assigned to s */
10: i = "i = ..."; /* $L5 assigned to i */
11:
12: l = "l = ..."; /* $L6 assigned to low word of l,
13: * upper word cleared
14: */
15:
16: /* f = "f = ..."; /* totally illegal */
17:
18: s = p; /* p assigned to s */
19: i = p; /* p assigned to i */
20:
21: l = p; /* p assigned to low word of l,
22: * upper word cleared.
23: */
24:
25: /* f = p; /* totally illegal */
26:
27: p = 'a';
28: p = 5;
29: p = 15L;
30: p = 100000L; /* -74540(8) is assigned to p, with no
31: * truncation warning, but then the same
32: * thing happens with the next statement,
33: * so this is a global error
34: */
35:
36: i = 100000L; /* -74540(8) assigned to i */
37:
38: p = s; /* s assigned to p */
39: p = i; /* i assigned to p */
40: p = l; /* low word of l assigned to p */
41: /* p = f; /* totally illegal */
42:
43: l = i; /* i assigned to low word of l,
44: * upper word sign extended
45: */
46: }
Defined functions
main
defined in line
1;
never used