Compiling:

struct _Impl_base
{
  _Impl_base() = default;
  virtual ~_Impl_base() = default;
};

template<typename _Tp>
class _Impl : public _Impl_base
{ };

int main()
{
  _Impl<int> i;
  return 0;
}


Gives:
gcc version 4.4.0 20090208 (experimental) (GCC) 

%COMP.sh "-g -O0 -std=c++0x -fno-inline" vague_vs_default.cc
vague_vs_default.cc:4: warning: inline function ‘virtual
_Impl_base::~_Impl_base()’ used but never defined
vague_vs_default.cc:4: warning: inline function ‘virtual
_Impl_base::~_Impl_base()’ used but never defined

Which seems strange, as the base destructor is defined as default.

Also, the vauge linkage/vtable documentation bits here
http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118

may need to be updated or expanded to take into account defaulted destructors
vs. key method vtable emission.


-- 
           Summary: virtual default dtor not defined
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39153

Reply via email to