On 11/02/2017 09:31 AM, Richard Biener wrote:
On Thu, Nov 2, 2017 at 3:55 PM, Jeff Law <l...@redhat.com> wrote:

As has been discussed on-list.  This patch adds a virtual destructor to the
new classes in tree-ssa-propagate.h per our coding conventions and what are
considered best practices.  It doesn't matter for any code I'm aware of
today -- it's a defensive measure.

This also drops the "virtual" keyword on the FINAL OVERRIDE member functions
in gimple-ssa-sprintf's sprintf_dom_walker class.  Opinions here are more
mixed.  It's agreed that the keyword is redundant in this context.  The
question is whether or not it adds confusion or reduces confusion.

The virtual keyword intuitively implies to me the member can be overridden
by a derived class, but that's in direct conflict with the FINAL keyword.

Others focus more on the fact that the virtual keyword implies that the
calls are typically indirect.   But in the case of a FINAL, one of the hopes
is that devirt can use the information to change the indirect call into a
direct call.

Does omitting 'virtual' have semantic meaning in C++?  I don't see
code-generation
differences for
In the cases we're dealing with it has no semantic meaning.

jeff

Reply via email to