scc

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

0044-struct.c (234B)


      1 struct s {
      2     int x;
      3     struct {
      4         int y;
      5         int z;
      6     } nest;
      7 };
      8 
      9 int
     10 main() {
     11     struct s v;
     12     v.x = 1;
     13     v.nest.y = 2;
     14     v.nest.z = 3;
     15     if (v.x + v.nest.y + v.nest.z != 6)
     16         return 1;
     17     return 0;
     18 }
     19