From b32d2ea8c29203519fbd9c5e90b06941e7cd75f3 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 11 Sep 2020 11:53:15 +0000 Subject: [PATCH] libstdc++-v3/include/bits/regex_error.h: Avoid warning with -fno-exceptions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When building with -fno-exceptions, __GLIBCXX_THROW_OR_ABORT expands to abort(), causing warnings: unused parameter '__ecode' unused parameter '__what' This patch adds __attribute__((unused)) to avoid them. 2020-09-11 Torbjörn SVENSSON Christophe Lyon libstdc++-v3/ * include/bits/regex_error.h: Avoid warning with -fno-exceptions. --- libstdc++-v3/include/bits/regex_error.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/regex_error.h b/libstdc++-v3/include/bits/regex_error.h index 09e9288788c..88f3f8114a4 100644 --- a/libstdc++-v3/include/bits/regex_error.h +++ b/libstdc++-v3/include/bits/regex_error.h @@ -167,7 +167,8 @@ namespace regex_constants __throw_regex_error(regex_constants::error_type __ecode); inline void - __throw_regex_error(regex_constants::error_type __ecode, const char* __what) + __throw_regex_error(regex_constants::error_type __ecode __attribute__((unused)), + const char* __what__attribute__((unused))) { _GLIBCXX_THROW_OR_ABORT(regex_error(__ecode, __what)); } _GLIBCXX_END_NAMESPACE_VERSION -- 2.30.2