scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0252-literal.c (292B)


      1 int
      2 cmp(int *v)
      3 {
      4 	if (v[0] != 1)
      5 		return 1;
      6 	if (v[1] != 2)
      7 		return 2;
      8 	if (v[2] != 3)
      9 		return 3;
     10 	if (v[3] != 4)
     11 		return 4;
     12 	if (v[4] != 69)
     13 		return 5;
     14 	return 0;
     15 }
     16 
     17 int
     18 set(int *a)
     19 {
     20 	*a = 69;
     21 	return 1;
     22 }
     23 
     24 int
     25 main(void)
     26 {
     27 	int a;
     28 
     29 	set(&a);
     30 	return cmp((int []) {1, 2, 3, 4, a});
     31 }