title: Is there a g++ equivalent to Visual Studio's __declspec(novtable)?
body: <p>Is there a g++ equivalent to Visual Studio's <code>__declspec(novtable)</code> argument? </p>
  
  <p>Basically, in a pure virtual base class the <code>__declspec(novtable)</code> argument can be used to suppress the creation of a vtable for the base class as well as vtable initialization/deinitialization code in the contstructor/destructor respectively. E.g.,</p>
  
  <pre><code>class __declspec(novtable) PureVirtualBaseClass
  {
      public: 
         PureVirtualBaseClass(){}
         virtual ~PureVirtualBaseClass() = 0;
  };
  </code></pre>
  
  <p>See <a href="http://msdn.microsoft.com/en-us/magazine/cc301398.aspx" rel="noreferrer">Paul DiLascia's article</a> for more info. Also see my related <a href="https://stackoverflow.com/questions/1801258/does-using-declspecnovtable-on-abstract-base-classes-affect-rtti-in-any-way">question</a>.</p>