title: error: anachronistic old-style base class initializer
body: <p>The following code produces the subsequent compilation error on all versions of GCC that I've tried, in C++98, C++11 and C++14 modes:</p>
  
  <pre><code>struct T
  {
      T(void* x) : (x) {}
  };
  
  // main.cpp: In constructor 'T::T(void*)':
  // main.cpp:3:18: error: anachronistic old-style base class initializer [-fpermissive]
  //      T(void* x) : (x) {}
  //                   ^
  // main.cpp:3:16: error: unnamed initializer for 'T', which has no base classes
  //      T(void* x) : (x) {}
  </code></pre>
  
  <p>Sure, it's clearly broken code because I'm not actually initialising anything.</p>
  
  <p><strong>But why is it a base-class initialiser and why is it "anachronistic", rather than simply wrong? Was it once valid? When? And what did it mean?</strong></p>
  
  <hr>
  
  <p>The <a href="http://studiofreya.com/2014/02/27/error-anachronistic-old-style-base-class-initializer/" rel="noreferrer">only rel</a><a href="https://www.allegro.cc/forums/thread/274361" rel="noreferrer">ated references</a> I've found to this on the web have been people coming across the error when a member name was accidentally macro'd out, effectively resulting in the same code as above:</p>
  
  <pre><code>#define bar
  // ^ some library could have done this
  
  struct T
  {
      T(int x)
          : bar(x)   // effectively just `: (x)`
      {}
  
      int bar;       // will cause its own error
  };
  </code></pre>
  
  <p>Those people never did find out what the error meant, although they later at least discovered why their program was broken.</p>