title: Why are the values returned by sizeof() compiler dependent?
body: <pre><code>struct A
  {
      char c;
      double d;
  } a;
  </code></pre>
  
  <ul>
  <li>In mingw32-gcc.exe:     <code>sizeof a = 16</code></li>
  <li>In gcc 4.6.3(ubuntu):   <code>sizeof a = 12</code></li>
  </ul>
  
  <p>Why they are different? I think it should be 16, does gcc4.6.3 do some optimizations?</p>