title: Declaration of method changes meaning of symbol
body: <p>For the following code:</p>
  
  <pre><code>struct foo {};
  
  struct A
  {
      typedef foo foo_type;
  
      void foo();
  };
  </code></pre>
  
  <p>GCC gives a compiler error:</p>
  
  <pre><code>test.cpp:7:14: error: declaration of 'void A::foo()' [-fpermissive]
       void foo();
                ^
  test.cpp:1:8: error: changes meaning of 'foo' from 'struct foo' [-fpermissive]
   struct foo {};
          ^
  </code></pre>
  
  <p>But clang accepts it without compiler errors. Who is right?</p>
  
  <p>Note that if the typedef is removed, or changed to <code>typedef ::foo foo_type</code>, both gcc and clang accept the code.</p>