https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58407
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #14) > An interesting subcategory I noticed when I had the warning on by default is > classes with a virtual destructor, such as the exception hierarchy. The > warning calls attention to potential slicing problems, and so I think we > don't want to add defaulted copy ops; it's good for users to be encouraged > to e.g. catch by reference. For the record, I changed my mind about this; a slicing warning should only apply to copies from an object of unknown dynamic type. -Wdeprecated-copy added for GCC 9.