-
Notifications
You must be signed in to change notification settings - Fork 278
Build error: throw will always call terminate #1414
Comments
Additional info:
|
Note, a comment states that throwing an exception from within the destructor is intended, even if "not good". Output::~Output() {
// If we have any outgoing links, then there has been an
// error in the shutdown process. Not good to thow an exception
// from a destructor, but we need to catch this error, and it
// should never occur if nupic internal logic is correct.
NTA_CHECK(links_.size() == 0) << "Internal error in region deletion";
delete data_;
} |
WIth diff --git a/CommonCompilerConfig.cmake b/CommonCompilerConfig.cmake
index a2b2a534..05eed935 100644
--- a/CommonCompilerConfig.cmake
+++ b/CommonCompilerConfig.cmake
@@ -260,8 +260,8 @@ else()
endif()
set(shared_compile_flags "${shared_compile_flags} ${stdlib_common} -fdiagnostics-show-option")
- set (internal_compiler_warning_flags "${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers")
- set (external_compiler_warning_flags "${external_compiler_warning_flags} -Wno-unused-variable -Wno-unused-parameter -Wno-incompatible-pointer-types -Wno-deprecated-declarations")
+ set (internal_compiler_warning_flags "${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-error=terminate -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers")
+ set (external_compiler_warning_flags "${external_compiler_warning_flags} -Wno-error=terminate -Wno-unused-variable -Wno-unused-parameter -Wno-incompatible-pointer-types -Wno-deprecated-declarations")
CHECK_CXX_COMPILER_FLAG(-m${BITNESS} compiler_supports_machine_option)
if (compiler_supports_machine_option) |
I don't know the history here. This has not been failing in any of our CI builds. What OS is this? I'm not sure adding this option is the right thing to do. @lscheinkman? |
Hi Matthew,
My guess is that it has to do with never versions of GCC. My version of GCC outputs a warning ( As for OS, I'm running Arch Linux,
Let me know if you require any additional information. Cheers P.S. Thanks Matthew for putting the HTM school videos up on YouTube, they've been fun to follow. |
I'll keep an eye out for GCC failures like this being reported. Thanks for writing this up. |
Btw, duplicate of #1000 |
👎 for the proposed fix with |
When trying to build nupic.core at rev 7d66fc32c65358d3759c6794c6ddb1ce7d33ab79, I received the following error message:
The text was updated successfully, but these errors were encountered: