boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

00046.c (331B)


      1 typedef struct {
      2 	int a;
      3 	union {
      4 		int b1;
      5 		int b2;
      6 	};
      7 	struct { union { struct { int c; }; }; };
      8 	struct {
      9 		int d;
     10 	};
     11 } s;
     12 
     13 int
     14 main()
     15 {
     16 	s v;
     17 	
     18 	v.a = 1;
     19 	v.b1 = 2;
     20 	v.c = 3;
     21 	v.d = 4;
     22 	
     23 	if (v.a != 1)
     24 		return 1;
     25 	if (v.b1 != 2 && v.b2 != 2)
     26 		return 2;
     27 	if (v.c != 3)
     28 		return 3;
     29 	if (v.d != 4)
     30 		return 4;
     31 	
     32 	return 0;
     33 }