scc

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

0229-commalog.c (260B)


      1 int a, b, c;
      2 
      3 #include <stdio.h>
      4 
      5 int
      6 main()
      7 {
      8 	int d;
      9 
     10 	d = a = 1, b = 2, c = 3;
     11 	if (d != 1)
     12 		return 1;
     13 	d = c, a || b;
     14 	if (d != 3)
     15 		return 2;
     16 	d = (c, a || b);
     17 	if (d != 1)
     18 		return 3;
     19 	d = a && (a = b + 2, a = 0);
     20 	if (d != 0)
     21 		return 4;
     22 
     23 	return 0;
     24 }