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.
*** Bug 39158 has been marked as a duplicate of this bug. ***
Subject: Bug 39153 Author: jason Date: Thu Feb 12 02:01:07 2009 New Revision: 144119 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144119 Log: PR c++/39153 * decl2.c (cp_write_global_declarations): Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL. Added: trunk/gcc/testsuite/g++.dg/cpp0x/defaulted9.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c trunk/gcc/testsuite/ChangeLog
Fixed.