Warnings for uninitialized members disappear on the C++11 : <p>I compile this simple program:</p>

<pre><code>#include &lt;cstdio&gt;
#include &lt;iostream&gt;

using namespace std;

struct Foo
{
    int a;
    int b;
};

struct Bar
{
    //Bar() = default;
    int d;
};

int main()
{
    Foo foo;
    Bar bar;

    printf("%d %d\n", foo.a, foo.b);

    return 0;
}
</code></pre>

<p>and I get those warnings:</p>

<pre><code>$ g++ -std=c++11 -Wall -Wextra -Wpedantic foo.cpp -o foo
foo.cpp: In function ‘int main()’:
foo.cpp:21:9: warning: unused variable ‘bar’ [-Wunused-variable]
     Bar bar;
         ^
foo.cpp:23:11: warning: ‘foo.Foo::b’ is used uninitialized in this function [-Wuninitialized]
     printf("%d %d\n", foo.a, foo.b);
           ^
foo.cpp:23:11: warning: ‘foo.Foo::a’ is used uninitialized in this function [-Wuninitialized]
</code></pre>

<p>Of course, this is what we expect. But when I uncomment the <code>Bar</code> default ctor, there is a problem - all warnings disappear.</p>

<p>Why the <code>Bar</code> ctor disables warnings for <code>Foo</code>?</p>

<p>My GCC version is: <code>g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609</code>.</p>

<p>The problem does not occur on the C++03, only on the C++11 or newer.</p>
