Skip to content

gui: Building with gcc 9 prints a trillion warnings (-Wdeprecated-copy) #15822

@maflcko

Description

@maflcko

Some of them are legitimate, but others are in upstream library headers from qt (5.12.1-1.fc30)

The version of gcc I was using:

$ gcc --version
gcc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)
Copyright (C) 2019 Free Software Foundation, Inc.

There has been a recent fixup (gcc-mirror/gcc@482bd38). The date suggests that this was fixed in the version of gcc I was using, but the warnings are still printed.

Some example warnings:

/usr/include/qt5/QtWidgets/qstyleoption.h: In member function ‘QStyleOptionGroupBox& QStyleOptionGroupBox::operator=(const QStyleOptionGroupBox&)’:
/usr/include/qt5/QtWidgets/qstyleoption.h:626:24: warning: implicitly-declared ‘QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex&)’ is deprecated [-Wdeprecated-copy]
  626 | class Q_WIDGETS_EXPORT QStyleOptionGroupBox : public QStyleOptionComplex
      |                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/qt5/QtWidgets/qstyleoption.h:510:5: note: because ‘QStyleOptionComplex’ has user-provided ‘QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex&)’
  510 |     QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/qt5/QtWidgets/qstyleoption.h: In copy constructor ‘QStyleOptionGroupBox::QStyleOptionGroupBox(const QStyleOptionGroupBox&)’:
/usr/include/qt5/QtWidgets/qstyleoption.h:640:108: note: synthesized method ‘QStyleOptionGroupBox& QStyleOptionGroupBox::operator=(const QStyleOptionGroupBox&)’ first required here
  640 |     QStyleOptionGroupBox(const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
      |                                                                                                            ^~~~~
/usr/include/qt5/QtWidgets/qstyleoption.h: In copy constructor ‘QStyleOptionSizeGrip::QStyleOptionSizeGrip(const QStyleOptionSizeGrip&)’:
/usr/include/qt5/QtWidgets/qstyleoption.h:654:108: warning: implicitly-declared ‘QStyleOptionSizeGrip& QStyleOptionSizeGrip::operator=(const QStyleOptionSizeGrip&)’ is deprecated [-Wdeprecated-copy]
  654 |     QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
      |                                                                                                            ^~~~~
/usr/include/qt5/QtWidgets/qstyleoption.h:654:5: note: because ‘QStyleOptionSizeGrip’ has user-provided ‘QStyleOptionSizeGrip::QStyleOptionSizeGrip(const QStyleOptionSizeGrip&)’
  654 |     QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/include/qt5/QtWidgets/qstyleoption.h: In member function ‘QStyleOptionSizeGrip& QStyleOptionSizeGrip::operator=(const QStyleOptionSizeGrip&)’:
/usr/include/qt5/QtWidgets/qstyleoption.h:645:24: warning: implicitly-declared ‘QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex&)’ is deprecated [-Wdeprecated-copy]
  645 | class Q_WIDGETS_EXPORT QStyleOptionSizeGrip : public QStyleOptionComplex
      |                        ^~~~~~~~~~~~~~~~~~~~
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions