title: Why default constructor of private member is not called?
body: <p>I have reduced my problem to the following code:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;stdio.h&gt;
  #include &lt;list&gt;
  using namespace std;
  class B
  {
  public:
      B(){
          cout&lt;&lt;"Default ctor of B"&lt;&lt;endl;
      };
  };
  
  class C
  {
  public:
      C()
      {
          cout&lt;&lt;"Default ctor of C"&lt;&lt;endl;
      }
      void sayHello()
      {
          cout&lt;&lt;"Say hello"&lt;&lt;endl;
      }
  };
  class A: public B
  {
  public:
      void fun()
      {
          c.sayHello();
      }
  private:
      C c;
  };
  
  int main(int argc, char** argv)
  {
      A* a=new A();
      a-&gt;fun();
      delete a;
      return 0;
  }
  </code></pre>
  
  <p>When I create object of A, I can see that default constructor of C is not called, but when I invoke A::fun() it invokes C::sayHello() properly. How is that possible? I crosscompile it under specific toolchain, but still how is it possible to allocate object memory and not invoke it's default ctor's body? That seems to be obvious compiler bug, isn't it?</p>
  
  <p>When I compiled the above code with GCC on Fedora, it all worked as expected...</p>
  
  <p>EDIT:
  Compiler is GCC-4.2 tailored for Broadcom chipset. Problem exists on embedded system, when code is executed. What solves it, is adding default empty constructor to A:</p>
  
  <pre><code>A(){}
  </code></pre>
  
  <p>even without explicitly calling C member's default constructor on it's initialization list.</p>