Default destructor doesn't have noexcept flag

Default destructor doesn't have noexcept flag

Hi,

I think here is another bug in the Intel Compiler XE 2014, SP1 Update 1 on Windows. Consider the following piece of code:

struct X
{
    ~X() { };
};
int main()
{
    X x;
    static_assert(noexcept(x.~X()), "Ouch!");
}

This doesn't compile with Intel on Windows but it compiles fine using gcc 4.8.2 and CLang 3.4 on Linux. Moreover an answer on stackoverflow suggests that this should actually compile: http://stackoverflow.com/questions/15721544/destructors-and-noexcept

Cheers,

Raffael

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Have reprocuded as you said ,I will enter this into bug-tracking system and will get you posted on any progress on this .Thank you for your issue submission.

 

Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:

User forums:                   http://software.intel.com/en-us/forums/

This will not be fixed since Mircosoft VS2013 doesn't support noexcept yet.

On Windows, the default is not to have implicit noexcept. On Linux, a fix has been added to enable this default in g++ 4.8 and later versions. So this is fine on Linux.

Thank you.
--
QIAOMIN.Q
Intel Developer Support

Hello Raffael,

14.0 Update 3, which went out on April 10, already has the fix on Linux.
There are no plans to fix this on Windows (since MS does not support it yet, and there are name mangling implications.).There are NO plans to fix this on *Windows* until MS Visual Studio begins to support it.

Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:

User forums: http://software.intel.com/en-us/forums/

Leave a Comment

Please sign in to add a comment. Not a member? Join today