scc

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

0047-anonexport.c (354B)


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