title: Why do I get "warning: missing initializer for member"? [-Wmissing-field-initializers]?
body: <p>Why am I getting a warning about initialization in one case, but not the other? The code is in a C++ source file, and I am using GCC 4.7 with <code>-std=c++11</code>.</p>
  <hr />
  <pre><code>struct sigaction old_handler, new_handler;
  </code></pre>
  <p>The above doesn't produce <em>any</em> warnings with <code>-Wall</code> and <code>-Wextra</code>.</p>
  <hr />
  <pre><code>struct sigaction old_handler={}, new_handler={};
  struct sigaction old_handler={0}, new_handler={0};
  </code></pre>
  <p>The above produces warnings:</p>
  <pre class="lang-none prettyprint-override"><code>warning: missing initializer for member ‘sigaction::__sigaction_handler’ [-Wmissing-field-initializers]
  warning: missing initializer for member ‘sigaction::sa_mask’ [-Wmissing-field-initializers]
  warning: missing initializer for member ‘sigaction::sa_flags’ [-Wmissing-field-initializers]
  warning: missing initializer for member ‘sigaction::sa_restorer’ [-Wmissing-field-initializers]
  </code></pre>
  <hr />
  <p>I've read through <em><a href="https://stackoverflow.com/questions/4782628/how-should-i-properly-initialize-a-c-struct-from-c">How should I properly initialize a C struct from C++?</a></em>, <em><a href="https://stackoverflow.com/questions/1538943/why-is-the-compiler-throwing-this-warning-missing-initializer-isnt-the-stru">Why is the compiler throwing this warning: &quot;missing initializer&quot;? Isn&#39;t the structure initialized?</a></em>, and bug reports like <em><a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750" rel="nofollow noreferrer">Bug 36750. Summary: -Wmissing-field-initializers relaxation request</a></em>. I don't understand why the uninitialized struct <em>is not</em> generating a warning, while the initialized struct <em>is</em> generating a warning.</p>
  <p>Why is the uninitialized structs <em>not generating</em> a warning; and why is the initialized structs <em>generating</em> a warning?</p>