title: LCC: Initializing Structs Containing Structs?
body: <p>The following code snippet compiles just fine on Mac OS X with gcc, but fails to compile on Windows with lcc-win32:</p>
  
  <pre><code>typedef struct Foo Foo;
  typedef struct Bar Bar;
  
  struct Bar { int age; int height; };
  struct Foo { Bar barOne; Bar barTwo; };
  
  // Elsewhere, in some function:
  
  Bar barOne = { 2, 4 };
  Bar barTwo = { 6, 8 };
  Foo instance = { barOne, barTwo };
  </code></pre>
  
  <p>And gives this error:</p>
  
  <blockquote>
    <p>found 'struct Bar' expected 'int'</p>
  </blockquote>
  
  <p>I can 'overcome' this by initializing the struct this way:</p>
  
  <pre><code>Foo instance = { barOne.age, barOne.height, barTwo.age, barTwo.height };
  </code></pre>
  
  <p>So, I understand what's going on... but I feel like this makes my code a lot more complex (I need to understand the implementation and layout of the other structs I'm using, instead of simply consuming them - and if that layout changes, I have to spider that change out to anyone else using the struct).</p>
  
  <p>I'm wondering if LCC is being either "more strict" (adhering to some standard) or "more dumb" (the compiler is too dumb to handle this situation).</p>
  
  <p>Thanks.</p>
  
  <p>Also, please see my other LCC-Win32 question: <a href="https://stackoverflow.com/questions/7273535/lcc-forward-declaration-of-typedefd-enum-failing">LCC: Forward Declaration of Typedef&#39;d Enum Failing?</a></p>