Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Diagnostic 809 error

wpoely86
Beginner
670 Views

Hi,

I'm trying to compile Qt 5.7 with icpc 16.0.3 20160415. I'm getting the following error:

icpc -c -pch-use .pch/Qt5Quick.pchi -include ../../include/QtQuick/QtQuickDepends -O2 -xSSE2 -ftz -fp-speculation=safe -fp-model source -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -w1 -Wall -Wcheck -wd1572,873,2259,2261 -D_REENTRANT -D_REENTRANT -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -DQT_BUILD_QUICK_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EGL -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtQuick -I../../include/QtQuick/5.6.0 -I../../include/QtQuick/5.6.0/QtQuick -I. -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtGui/5.6.0 -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtGui/5.6.0/QtGui -I../../include/QtQml/5.6.0 -I../../include/QtQml/5.6.0/QtQml -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0 -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtGui -I../../include/QtQml -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtNetwork -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore -I.moc -isystem /user/scratch/gent/vsc403/vsc40307/EB/metapod/software/Mesa/12.0.1-intel-2016b/include -isystem /apps/gent/CO7/x86-64/software/X11/20160819-intel-2016b/include -I/build/vsc40307/Qt5/5.6.0/intel-2016b/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/linux-icc-64 -o .obj/qquickstateoperations.o items/qquickstateoperations.cpp
"items/qquickitemanimation.cpp": using precompiled header file ".pch/Qt5Quick.pchi"
"items/qquickstateoperations.cpp": using precompiled header file ".pch/Qt5Quick.pchi"
items/qquickitemanimation.cpp(207): error #809: exception specification for virtual function "QQuickParentAnimationData::~QQuickParentAnimationData" is incompatible with that of overridden function "QAbstractAnimationAction::~QAbstractAnimationAction"
          ~QQuickParentAnimationData() { qDeleteAll(pc); }

I understand what error #809 means but it doesn't seem to make any sense here. It fails over the destructor of https://github.com/qt/qtdeclarative/blob/dev/src/quick/items/qquickitemanimation.cpp#L203 which is derived from https://github.com/qt/qtdeclarative/blob/dev/src/quick/util/qquickanimation_p_p.h#L75

As you can see, the base class doesn't specify any throw restrictions and neither does the class itself. So why is the compiler gives me this error? I've already successfully compiled Qt 5.7 with icpc 16.0.1 20151021 in the past.

0 Kudos
1 Solution
Judith_W_Intel
Employee
670 Views

 

I think this is a known problem (currently entered in our bug database as DPD200586747).

The bug is triggered by having the derived class declared as a local class, i.e.:

/*
This gets a spurious error.

sptel15-182> g++48 -std=c++11 -c bug.cpp
sptel15-183> $HOME/EDG/4.11/bin/eccp --g++ --gnu_version=40800 --c++11 bug.cpp
"bug.cpp", line 13: error: exception specification for virtual function
          "Derived::~Derived" is incompatible with that of overridden function
          "Base::~Base"
          ~Derived() { ; }
          ^

1 error detected in the compilation of "bug.cpp".
sptel15-184>

If the class is not a local class or if QList is not a template class the error is not emitted.
*/

template <class T> struct QList {};

struct Base
{
    virtual ~Base() {}
};

void foo()
{
    struct Derived : public Base
    {
        ~Derived() { ; }
        QList<int> pc;
    };

    Derived *data = new Derived;
}
 

View solution in original post

0 Kudos
5 Replies
Judith_W_Intel
Employee
671 Views

 

I think this is a known problem (currently entered in our bug database as DPD200586747).

The bug is triggered by having the derived class declared as a local class, i.e.:

/*
This gets a spurious error.

sptel15-182> g++48 -std=c++11 -c bug.cpp
sptel15-183> $HOME/EDG/4.11/bin/eccp --g++ --gnu_version=40800 --c++11 bug.cpp
"bug.cpp", line 13: error: exception specification for virtual function
          "Derived::~Derived" is incompatible with that of overridden function
          "Base::~Base"
          ~Derived() { ; }
          ^

1 error detected in the compilation of "bug.cpp".
sptel15-184>

If the class is not a local class or if QList is not a template class the error is not emitted.
*/

template <class T> struct QList {};

struct Base
{
    virtual ~Base() {}
};

void foo()
{
    struct Derived : public Base
    {
        ~Derived() { ; }
        QList<int> pc;
    };

    Derived *data = new Derived;
}
 

0 Kudos
wpoely86
Beginner
670 Views

Hi Judith,

Indeed, making the struct non-local solves the error. Does this bug already have a fix and will it be part of the next release?

Thanks,

Ward

0 Kudos
Judith_W_Intel
Employee
670 Views

 

Yes I just checked in a fix for this bug yesterday and you can expect the fix in the next 17.0 update (17.0 update 1).

Sorry for the inconvenience.

Judy

0 Kudos
Jeff_Franklin
Beginner
670 Views

Hi,

I have been working with this problems for a while now.  I just tried to compile Qt 5.6.1 with the 17.0 release of the compiler and still have the same problem.  Judy you mentioned that this will be fixed in the update 1 of the 17.0 compiler do you have an estimate on when this update might be released? 

Thanks,

 

Jeff

0 Kudos
Judith_W_Intel
Employee
670 Views

 

Sorry but I don't think I'm allowed to give out any dates (and they would just be an estimate anyway).

Judy

0 Kudos
Reply