File: test58.ci

package info (click to toggle)
clif 0.93-9
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 4,228 kB
  • ctags: 3,284
  • sloc: ansic: 31,464; yacc: 5,067; lex: 819; makefile: 383; sh: 48
file content (40 lines) | stat: -rw-r--r-- 606 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
float a, b;
int *p, c[5], i, j;

struct a {
  int a;
  double b;
};

struct a x;

int
foo ()
{
  return j++;
}

a = 4;
b = 5;

printf ("%.0f %.0f\n", a, b);
b = a++ + b + a;
printf ("%.0f %.0f\n", a, b);

for (i = 0; i < 5; ++i)
  c[i] = i;
  
  a = c[foo ()]++ + c[foo ()]++ + c[0];
  x.a++;
  x.b++;
  printf ("2=%.0f 2=%d 1=%d 2=%d 1=%g 3=%g\n",
	  a, c[1], x.a++, x.a, x.b++, ++x.b);
  
  p = c;
  printf ("%d=%d %d=%d %d=%d\n", 
	  c[0], *p, c[2], *(p + 2), c[4], *(p + 4));
  printf ("%d=%d %d=%d %d=%d ",
	  c[0], *p++, c[2], *++p--, c[4], *(p + 4));
  p += 2;
  printf ("%d=%d\n", c[2], *p);
exit;