Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ricardo_Costa
Beginner
155 Views

ICL emits warning #809 when using defaulted virtual destructors

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
155 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

Ricardo_Costa
Beginner
155 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

Judith_W_Intel
Employee
155 Views

 

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

Judy

 

JenniferJ
Moderator
155 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

roger567
New Contributor I
155 Views

I am still getting this with 16.0 release 2016.0.110

Marián__VooDooMan__M
New Contributor II
155 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.
Marián__VooDooMan__M
New Contributor II
155 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.
Ian_Mallett1
Beginner
155 Views

I can also reproduce this in version 16.

Reply