title: C++ "error: "object missing in reference to ..." depends on gcc version
body: <p>I am facing a compilation error with one gcc version (4.3.2), whereas the same code will be compiled without complaints with a newer version of gcc, e.g. 4.5.2.</p>
  
  <p>The following example illustrates the problem:</p>
  
  <pre><code>class Base {
    protected:
      int member;
  };
  
  template&lt;typename T&gt;
  class A : public Base {
  };
  
  template&lt;typename T&gt;
  class C : public A&lt;T&gt; {
      C() {
          Base::member = 1;
      }
  };
  
  int main() {
  }
  </code></pre>
  
  <p>For 4.3.2 I am getting:</p>
  
  <pre><code>test.cpp: In constructor 'C&lt;T&gt;::C()':
  test.cpp:4: error: object missing in reference to 'Base::member'
  test.cpp:14: error: from this location
  </code></pre>
  
  <p>For 4.5.2 it compiles just fine.</p>
  
  <p>If one compiler version accepts the code it cannot be completely wrong. My guess is that it conforms to the C++ standard, but the older compiler was lacking a proper implementation of the same.</p>
  
  <ol>
  <li>What exactly is the problem?</li>
  <li>Is there a portable way of writing that kind of code such that as much compilers as possible accept it?</li>
  </ol>