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

ICL emits warning #809 when using defaulted virtual destructors

Ricardo_Costa
Beginner
867 Views

The following code:

[cpp]

struct B

{

    B () = default; 

    virtual ~B () = default;

}; 

 

struct D : public B

{

    virtual ~D () = default;

};

[/cpp]

generates this warning:

warning #809: exception specification for virtual function "D::~D" is incompatible with that of overridden function "B::~B"

when compiled with: icl /c /Qstd=c++11

I believe this warning is in error since the defaulted destructors should have the same exception specification.

I'm using the latest Intel C++ Composer XE SP1 Update 1 (14.0.1.139).

0 Kudos
8 Replies
Judith_W_Intel
Employee
867 Views

 

Yes this does look like a spurious warning. I have entered this in our internal bug database as DPD200248506.

thank you for reporting it.

Judy

0 Kudos
Ricardo_Costa
Beginner
867 Views

Hi,

I see DPD200248506 listed as fixed in Update 2 (https://software.intel.com/en-us/articles/intel-composer-xe-2013-compilers-sp1-fixes-list), however that warning persisted, even in Update 3 and 2015 Beta. Could you verify that?

Thanks,

Ricardo

0 Kudos
Judith_W_Intel
Employee
867 Views

 

Sorry I gave you the wrong tracking number. This is actually DPD200250258 which is still open.

Judy

 

0 Kudos
JenniferJ
Moderator
867 Views

an update to this issue. it is fixed in the 16.0 beta. If you'd like to join our beta program, please see Intel® Parallel Studio XE 2016 Beta program has begun  

Jennifer

0 Kudos
roger567
New Contributor I
867 Views

I am still getting this with 16.0 release 2016.0.110

0 Kudos
Marián__VooDooMan__M
New Contributor II
867 Views
I'm having the same problem with ICC 15.0 (the latest update) when compiling wxWidgets in conjunction with virtual destructors. This warning is negligable, though It's annoying.
0 Kudos
Marián__VooDooMan__M
New Contributor II
867 Views
ah, I forgot to say, that wxWidgets project doesn't use c++11 features like "defaulted destructors" for compatibility reasons. So they are regularly implemented destructors, not defaulted.
0 Kudos
Ian_Mallett1
Beginner
867 Views

I can also reproduce this in version 16.

0 Kudos
Reply