scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

0055-enum.c (146B)


      1 enum E {
      2 	x,
      3 	y,
      4 	z,
      5 };
      6 
      7 int
      8 main()
      9 {
     10 	enum E e;
     11 
     12 	if(x != 0)
     13 		return 1;
     14 	if(y != 1)
     15 		return 2;
     16 	if(z != 2)
     17 		return 3;
     18 	
     19 	e = x;
     20 	return e;
     21 }
     22