https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88136

            Bug ID: 88136
           Summary: -Wdeprecated-copy is draconian and shouldn't be in
                    -Wall
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ville.voutilainen at gmail dot com
  Target Milestone: ---

Consider code like this:

struct X
{
protected:
    ~X() {}
};

struct Y : X 
{
    Y() = default;
    Y(const Y& other) : X(other) {}
};

int main()
{
    Y y;
    Y y2 = y;
}

gcc 9 warns about it, because X has a user-provided destructor. However, in
this particular case, and in cases where the implicitly-defaulted copy/move
are fine but the destructor does some extra work and is thus user-provided, the
compiler will warn.

The warning completely shatters the ability to build Qt.

Reply via email to