Skip to content

Warnings when compiling with gcc 9 #127

@dalboris

Description

@dalboris

When compiling VPaint with GCC 9, there are plenty of new warnings. If using Qt 5.12.3, a lot of them are along the lines of:

warning: implicitly-declared 
‘QVariant::Private& QVariant::Private::operator=(const QVariant::Private&)’ is deprecated [- 
Wdeprecated-copy]

This is fixed by upgrading to a newer version of Qt, e.g., 5.15, see bitcoin/bitcoin#15822. Note that if using Qt 5.15, you also need a recent version of QtCreator (e.g., QtCreator 4.15.0), otherwise you also get this problem:

https://bugreports.qt.io/browse/QTCREATORBUG-23855

A lot of warning are also coming from Eigen, e.g.:

/home/boris/Documents/VPaint/trees/vpaint/src/Third/Eigen/src/Core/arch/SSE/PacketMath.h:102: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
../../src/Third/Eigen/src/Core/arch/SSE/PacketMath.h:102:43: warning: ignoring attributes on template argument ‘Eigen::internal::Packet2d’ {aka ‘__vector(2) double’} [-Wignored-attributes]
  102 | template<> struct unpacket_traits<Packet2d> { typedef double type; enum {size=2}; };
      |                                           ^

This is discussed at https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221 , and in fact applies since GCC 6. Upgrading to Eigen 3.3+ should fix the problem (VPaint is currently using 3.2.5).

There are also warnings in VPaint itself, e.g.:

/home/boris/Documents/VPaint/trees/vpaint/src/Gui/UpdateCheckDialog.h:29: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::WindowType; QFlags<T>::Zero = int QFlags<Qt::WindowType>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations]
In file included from moc_UpdateCheckDialog.cpp:10:
../../src/Gui/UpdateCheckDialog.h:29:84: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::WindowType; QFlags<T>::Zero = int QFlags<Qt::WindowType>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations]
   29 |     UpdateCheckDialog(QString newVersion, QWidget *parent = 0, Qt::WindowFlags f = 0);
      |                                                                                    

To be investigated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions