Added a GCC 6 Build to Travis#1142
Conversation
|
@ShikharJ thanks for looking into this. What is the issue with the Why is the indentation fix needed in The fix in |
|
@certik Setting up a GCC 6 build initially gave this result: |
|
Ok, so regarding the throwing in destructors, that's a bug in Teuchos, that should be possible to fix by: commit 490b9391f616e42814ba2428e277e3b50d301dd1
Author: Ondřej Čertík <ondrej.certik@gmail.com>
Date: Fri Dec 2 10:27:06 2016 -0700
Allow the destructor to throw exceptions
diff --git a/symengine/utilities/teuchos/Teuchos_RCPNode.cpp b/symengine/utilities/teuchos/Teuchos_RCPNode.cpp
index 20afd2c..8adee12 100644
--- a/symengine/utilities/teuchos/Teuchos_RCPNode.cpp
+++ b/symengine/utilities/teuchos/Teuchos_RCPNode.cpp
@@ -624,7 +624,7 @@ ActiveRCPNodesSetup::ActiveRCPNodesSetup()
}
-ActiveRCPNodesSetup::~ActiveRCPNodesSetup()
+ActiveRCPNodesSetup::~ActiveRCPNodesSetup() noexcept(false)
{
#ifdef TEUCHOS_SHOW_ACTIVE_REFCOUNTPTR_NODE_TRACE
std::cerr << "\nCalled ActiveRCPNodesSetup::~ActiveRCPNodesSetup() : count = " << count_ << "\n";
diff --git a/symengine/utilities/teuchos/Teuchos_RCPNode.hpp b/symengine/utilities/teuchos/Teuchos_RCPNode.hpp
index 775e45b..b6aa97c 100644
--- a/symengine/utilities/teuchos/Teuchos_RCPNode.hpp
+++ b/symengine/utilities/teuchos/Teuchos_RCPNode.hpp
@@ -649,7 +649,7 @@ public:
/** \brief . */
ActiveRCPNodesSetup();
/** \brief . */
- ~ActiveRCPNodesSetup();
+ ~ActiveRCPNodesSetup() noexcept(false);
/** \brief . */
void foo();
private: |
|
The other changes are good, thanks for the clarification. The One thing that I don't know is if this change wouldn't propagate to all destructors of classes that use |
|
I'll keep you posted. Thanks! |
|
@certik The results that I got on a trial branch using the above patch and removing I am currently trying a noexcept(false) on ~RCPNode() destructor to see if it works. |
|
@certik @isuruf Applying
|
|
@ShikharJ when you use I suggest we do not use |
|
@certik What I meant to say was that changing |
b37be37 to
38960ef
Compare
| } | ||
| /** \brief . */ | ||
| virtual ~RCPNode() | ||
| virtual ~RCPNode() noexcept(false) |
There was a problem hiding this comment.
Can you wrap noexcept(false) in a #ifdef TECUHOS_DEBUG block?
certik
left a comment
There was a problem hiding this comment.
The PR looks very nice now, I just left some more simplifications to do.
| if(extra_data_map_) | ||
| delete extra_data_map_; | ||
| } | ||
| #endif |
There was a problem hiding this comment.
I would put it like this:
virtual ~RCPNode()
#ifdef TEUCHOS_DEBUG
noexcept(false)
#endif
{
...
}| } | ||
| } | ||
| #else | ||
| ActiveRCPNodesSetup::~ActiveRCPNodesSetup() |
There was a problem hiding this comment.
Just like I wrote below, just do:
ActiveRCPNodesSetup::~ActiveRCPNodesSetup()
#ifdef TEUCHOS_DEBUG
noexcept(false)
#endif
{
...
}There was a problem hiding this comment.
I'll make the changes. Thanks @certik. This is a nice implementation.
27d4555 to
d21a1e6
Compare
.travis.yml
Outdated
| - binutils-dev | ||
| - g++-5 | ||
| - clang-format-3.7 | ||
| - env: BUILD_TYPE="Debug" WITH_BFD="yes" WITH_GCC_6="yes" WITH_COVERAGE="yes" |
There was a problem hiding this comment.
Can you remove WITH_COVERAGE=yes here, as running coverage for gcc-6 is not different from gcc-5
| ~ActiveRCPNodesSetup() noexcept(false); | ||
| #else | ||
| ~ActiveRCPNodesSetup(); | ||
| #endif |
There was a problem hiding this comment.
Can you make this consistent with the others by wrapping only noexcept(false)?
| ~ActiveRCPNodesSetup() noexcept(false); | ||
| #else | ||
| ~ActiveRCPNodesSetup(); | ||
| #endif |
| /** \brief . */ | ||
| virtual ~RCPNode() | ||
| #ifdef TEUCHOS_DEBUG | ||
| noexcept(false) |
There was a problem hiding this comment.
Can you add 4 spaces before noexcept?
|
|
||
| ActiveRCPNodesSetup::~ActiveRCPNodesSetup() | ||
| #ifdef TEUCHOS_DEBUG | ||
| noexcept(false) |
There was a problem hiding this comment.
Can you add 4 spaces before noexcept?
|
That looks good to me now. It looks like just a simple change was needed in Teuchos. @isuruf are you ok with that as well? |
Relevant: #1134
@isuruf @certik
-Wno-error=terminatehas been added for now. What should be our approach? Should we modify the teuchos library code or rather suppress the-werror=terminateflag?