http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57319
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-05-20
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Paul Pluzhnikov from comment #0)
> However, this particular case *isn't* the problematic case, because
> (a) this sample code should not trigger the definition of C's move
> assignment operator, and
True, the warning is given at declaration time; it would be possible to move
the warning to when the move assignment is used, but that might mean design
errors don't get caught until later.
> (b) there is only one inheritance path from C to B, so it won't be
> move-assigned multiple times, and
True, the warning is given at the point of first virtual derivation rather than
when it appears in a diamond-shaped hierarchy. But the purpose of virtual
derivation is to support diamond-shaped hierarchies, so again it seems
appropriate to warn sooner rather than later.
> (c) the issue isn't with *non-trivial* move assignments, it's with
> *user-provided* move-assignments (for the virtual base or any of its
> subobjects), which B does not have.
Agreed, it would definitely be better for the warning to check that none of the
subobjects of B have user-provided move-assignments.