Jump to content
sumit_tuwien

Dynamic exceptions

Recommended Posts

We have found dynamic exceptions in SystemC. More than what the method throws we are concerned about deprecation of dynamic exception in next C++ versions. We see the issue can be solved for c++11 by replacing throw() with  noexcept instead. 

 

This will be egg and chicken problem with c++11 and c++03 :(. A compiler check can help to do this. Am I only crazy about c++11 ???

 

Regards, Sumit 

Share this post


Link to post
Share on other sites

As you may have noticed, only the exception-related SystemC classes (sc_report, sc_unwind_exception)  use exception specifications (and only the plain throw()).  These are required by C++03, see http://www.cplusplus.com/reference/exception/exception/.

 

Have you experienced problems (except for potential deprecation warnings) in C++11 mode on some compilers (clang?).  Can you share the compiler flags and the corresponding error messages?

 

/Philipp

Share this post


Link to post
Share on other sites

Only concern potential deprecation warnings, no other issue.

 

Compiler Flag for Clang :   

 

 

set ( CMAKE_CXX_FLAGS "-Wno-conversion -Wno-shorten-64-to-32 -Wno-implicit-fallthrough -Wno-c++98-compat-pedantic -Wno-float-equal -Wno-padded -Wno-sign-conversion -pthread -Weverything -pedantic -std=c++11 -fPIC" )

set ( CMAKE_C_FLAGS "-Wno-conversion -Wno-shorten-64-to-32 -Wno-implicit-fallthrough -Wno-c++98-compat-pedantic -Wno-float-equal -Wno-padded -Wno-sign-conversion -pthread -Weverything -fPIC" )
 

 

 
and you yourself can see the warnings. We are cleaning up warnings one by one.
 
Regards, Sumit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×