------- Comment #15 from albrt2000 at gmail dot com 2010-02-08 14:49 ------- (In reply to comment #14) > Basing on Core 906, seems rather straightforward that the snippet is > ill-formed, the only problem is that neither 4.4 nor current mainline reject > it.
That's also should be the case for non public access : struct A { private : /* or protected */ ~A() = default; }; should also be illed formed according to that report. > If that's the complete analysis, the issue is pretty low priority. Destroying an object from a base class pointer whose destructor is not virtual is an undefined behaviour according to the standard. I tend to think that silently removing the virutal property when considering the default declaration, introduces a serious bug in the code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42983