title: gcc can't find base class object
body: <p>The following code doesn't compile with gcc, but it compiles with clang.</p>
  <pre><code>struct Base {
    void base() {}
  };
  
  template&lt; typename T &gt;
  struct Foo : Base {
  
    struct Bar : Base {
    };
  
    struct Baz : Bar {
      void f() {
        base();
      }
    };
  };
  
  int main() {
    Foo&lt;int&gt;::Baz{}.f();
  }
  </code></pre>
  <p>gcc spits the following error:</p>
  <pre><code>13:11: error: cannot call member function 'void Base::base()' without object
     13 |       base();
        |       ~~~~^~
  </code></pre>
  <p>Interestingly, if I change it to <code>this-&gt;base();</code> or <code>Base::base();</code>, then it compiles.</p>
  <p>Why can't gcc find the <code>Base</code> class object? <code>Baz</code> is clearly a subclass of <code>Base</code>.</p>