title: Is the "empty base optimization" in GCC configurable?
body: <p>Consider these types:</p>
  
  <pre><code>  struct A {};
    struct B : A { int i; };
  </code></pre>
  
  <p><code>sizeof(A) &gt; 0</code> as required by the standard.</p>
  
  <p><code>sizeof(B)</code> should be 4 due to the empty base optimization. Yet on GCC 4.1.1 it's 5 (I'm using a pack of 1 in this area). And inconsistently - some of my files are getting it, some are not. Can't be sure what the differences are yet, we have a large prjoect.</p>
  
  <p>On the other three compilers I'm using (by Microsoft and Freescale), I don't have this problem. The empty base optimization is optional apparently, according to <a href="http://www.cantrip.org/emptyopt.html" rel="noreferrer">this article</a>.</p>
  
  <p>Is there a compiler option or pragma to tune this in GCC 4.1.1? I can work around the issue but I would like to understand what's going on first. I Googled for a while and can't seem to find anything.</p>