aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-09-11 12:07:02 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-09-11 13:00:29 +0000
commit55bdee9af3cff04192c64a573fa1767b48918efa (patch)
tree46e88856d621ab4123c0d0ddc23aee274e85ebbf
parentfb00a9fc397c5fc487218f7a84069837460f88ee (diff)
downloadgcc-55bdee9af3cff04192c64a573fa1767b48918efa.zip
gcc-55bdee9af3cff04192c64a573fa1767b48918efa.tar.gz
gcc-55bdee9af3cff04192c64a573fa1767b48918efa.tar.bz2
libstdc++-v3/libsupc++/eh_call.cc: Avoid "set but not used" warning
When building with -fno-exceptions, bad_exception_allowed is set but not used, causing a warning during the build. This patch adds __attribute__((unused)) to avoid it. 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com> Christophe Lyon <christophe.lyon@linaro.org> libstdc++-v3/ * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
-rw-r--r--libstdc++-v3/libsupc++/eh_call.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/libsupc++/eh_call.cc b/libstdc++-v3/libsupc++/eh_call.cc
index d50c4fb..3c7426e 100644
--- a/libstdc++-v3/libsupc++/eh_call.cc
+++ b/libstdc++-v3/libsupc++/eh_call.cc
@@ -124,7 +124,7 @@ __cxa_call_unexpected(void* exc_obj_in)
void* new_ptr = __get_object_from_ambiguous_exception (new_xh);
const std::type_info* catch_type;
int n;
- bool bad_exception_allowed = false;
+ bool bad_exception_allowed __attribute__((unused)) = false;
const std::type_info& bad_exc = typeid(std::bad_exception);
// Check the new exception against the rtti list