title: Minimum enum size not working in Delphi
body: <p>In order to interact with C/C++ structs I have to set minimum enum size in Delphi record to 4. However, I cannot get it to work properly.</p>
  
  <pre><code>type
    TFooEnum = (e1, e2, e3);
  
    {$Z4}
    TFoo = record
    public
      f: TFooEnum;
      b: byte;
    end;
    {$Z1}
  
    writeln(SizeOf(TFoo)); -&gt; output is 2 instead of 8
  </code></pre>
  
  <p>I have also tried with <code>{$Z+}</code> and <code>{$MINENUMSIZE 4}</code> It only works if I set it in compiler options for whole project, but that messes up other records memory layouts where enums have to be 1 byte in size.</p>