On 22/04/20 15:19 -0400, Jason Merrill wrote:
On 4/22/20 2:37 AM, Jonathan Wakely wrote:
These warnings have nothing to do with virtual functions, so "override"
is inappropriate. The warnings are just talking about defining special
members, so let's say that.

        PR translation/94698
        * class.c (check_field_decls): Change "override" to "define" in
        -Weffc++ diagnostics.

Tested powerpc64le-linux, OK for master?

It is overriding the default(ed) definition, but I agree that "override" now suggests virtual functions.

"define" is also wrong, though; it should be "declare". OK with that change.

I did consider that, but decided that it has to be user-provided (i.e.
defined by the user) to avoid the problem, because a user-declared but
defaulted function would still not clean up pointer members.

But either seems better than "override". I'll change it to declared (I
already committed the original version).


Reply via email to