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

C++ 2016 and warning #809

Stuart_M
Beginner
796 Views

Intel C++ 2016 on Windows is spitting out many warning #809 on code that never gave such warnings with previous versions and for which other compilers do not complain. It is related to virtual destructors in subclasses and says that the exception specification in the subclass destructor is incompatible with that of the overridden destructor. None of them have an explicit exception specification.

For now I'm disabling that warning but this appears to be a compiler issue. Comments?

Stuart

0 Kudos
6 Replies
Light_Intel
Moderator
796 Views

There is a logged issue about 'incompatible exception specification error with inherited virtual destructors - error #809'. The issue has been fixed. The fix will be included in future update of Intel Parallel Studio XE 2016. Thank you for pointing it out.

Noga

Intel Developer Support

0 Kudos
Stuart_M
Beginner
796 Views

OK, thanks for the info.

Stuart

0 Kudos
Katerina_B_
Beginner
796 Views

Instead of a warning I am getting an error 809 and I cannot proceed with builds of the rest of my projects. Is there an option to disable this check? When is the update to Intel C++ 16.0 will come out that fixes this issue?

0 Kudos
Light_Intel
Moderator
796 Views

Not all errors #809 are equal. Can you please describe the issue in greater detail and if possible attach a code sample that captures this issue?

Thanks,

Noga

0 Kudos
Stuart_M
Beginner
796 Views

FYI it seems to be fixed in 16.0 Update 1, or at least I can't trigger it easily now.

0 Kudos
Light_Intel
Moderator
796 Views

We had an open issue about a "warning #809", which was fixed in 2016 Update 1. If this is what you have been seeing you should be good.

Compile the attached preprocessed file using the command below gives

..\ace/Service_Object.h(52): warning #809: exception specification for virtual function "ACE_6_3_1::ACE_Service_Object::
~ACE_Service_Object" is incompatible with that of overridden function "ACE_6_3_1::ACE_Shared_Object::~ACE_Shared_Object"    virtual ~ACE_Service_Object (void);
which is incorrect to our idea, we don't use exception specifications in our code

icl.exe /Zc:wchar_t /nologo /Wp64 /Qstd=c++11 /Ob0 /W3 /Gm /EHsc /Zi /MDd /GR /Gy /wd4355 /D _DEBUG /D _AMD64_ /D WIN32 /D _WINDOWS /D _WIN64 /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _WINSOCK_DEPRECATED_NO_WARNINGS /D ACE_HAS_VERSIONED_NAMESPACE=1 /D ACE_BUILD_DLL /D MPC_LIB_MODIFIER=\"d\" /c "destructor.cpp"

 

0 Kudos
Reply