title: g++ warning about missing imlementation of pure virtual destructor
body: <p>In CentOS 6.5, I have a class <code>List</code> like:</p>
  
  <pre><code>// list.hpp
  
  namespace foo
  {
      class List
      {
      public:
          virtual int reserveMem ( int size) = 0;
          virtual int Insert ( int val) = 0;
          virtual int Find ( int val) = 0;
          virtual bool Empty() = 0;
      };
  }
  </code></pre>
  
  <p>It's part of the source code of a shared library. And I can build the whole library without any error or warning messages with g++ (version 4.4.7). The compiling flags used are</p>
  
  <blockquote>
    <p>-g -fPIC -Wall -Wextra -Werror</p>
  </blockquote>
  
  <p>Then we have another app which just includes a header file which includes this header file and got:</p>
  
  <blockquote>
    <p>list.hpp:14: error: 'class List' has virtual functions and accessible non-virtual destructor</p>
  </blockquote>
  
  <p>The warning message is valid. But g++ never complains about it when I build the library. Does anyone know why?</p>