title: How to fix C++ gcc compile warning for padding of struct
body: <p>I have the following innocuous looking code:</p>
  
  <pre><code>void myFunc(){
      struct stance {
          long double interval;
          QString name;
      };
      // [...]
  }
  </code></pre>
  
  <p>When I build this using standard version of gcc on Ubuntu 18.04 I get a warning like this:</p>
  
  <blockquote>
    <p>MySource.cpp:12: warning: padding size of 'stance' with 8 bytes to
    alignment boundary (-wpadded)</p>
  </blockquote>
  
  <p>I know that this warning shows up because the compiler needs to adjust the padding for my struct to something that I might not have expected and is kind enough to warn me as the user about this.</p>
  
  <p>However, I am trying to have a warning-free build and so the question is, <strong>how can I make it explicit in my code in a standard compliant way that the compiler does not need to issue this warning?</strong></p>
  
  <p>So to be clear, I <strong>don't want to suppress warnings</strong> in my build script, nor using #pragma or similar either. I want to <strong>change the code</strong> of this struct so that my alignment expectations are explicit and match whatever the compiler wants to do hence not needing the warning to be displayed.</p>