Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=] #96

Open
michalkrzyz opened this issue Dec 6, 2018 · 0 comments

Comments

@michalkrzyz
Copy link
Contributor

I have an issue compiling tests with hippomocks. It is just a warning but:
Scanning dependencies of target src_module_tests
[ 33%] Building CXX object tests/ut/CMakeFiles/src_module_tests.dir/tests/src/module_tests.cpp.o
In file included from /home/michal/mutate_tests/test/tests/tests/ut/tests/src/module_tests.cpp:2:
/home/michal/mutate_tests/test/tests/tests/../../test-frameworks/hippomocks/HippoMocks/hippomocks.h: In destructor ‘HippoMocks::MockRepository::~MockRepository()’:
/home/michal/mutate_tests/test/tests/tests/../../test-frameworks/hippomocks/HippoMocks/hippomocks.h:4320:25: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
catch(BASE_EXCEPTION e)
^
[ 33%] Built target src_module_tests
Scanning dependencies of target tlab_ut

looks not very nice.
I use SID distro with gcc/g++ version 8.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant