From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id CAE6B3858CD1; Fri, 23 Jun 2023 16:12:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAE6B3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687536736; bh=LcawmQ71hp5GLQTDg3YKVZl0u6+1lLXdoIZZ4Gelp14=; h=From:To:Subject:Date:From; b=B3VVZXU8micDAUrYKc9ikrM+nuMlO7Mdl3aJoyBCKlH7j+jt06hggARAJbnJjHMWE mf0lw7iQG8bI+YQ4xBOTXwP/835p6zEVZB/E9yXTOtWl+H0pnCRPilUu2cLnSQqses beAB8wQq9HP18WC7rlGoz8jXQlX96wnAPG7okc+Y= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r10-11459] libstdc++: include/bits/regex_error.h: Avoid warning with -fno-exceptions. X-Act-Checkin: gcc X-Git-Author: Christophe Lyon X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 179b130864652b88da4570e127ea97b627899c39 X-Git-Newrev: f0f8cb2a9f6ec5fdfebb0ee15064133d36a91d64 Message-Id: <20230623161216.CAE6B3858CD1@sourceware.org> Date: Fri, 23 Jun 2023 16:12:16 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f0f8cb2a9f6ec5fdfebb0ee15064133d36a91d64 commit r10-11459-gf0f8cb2a9f6ec5fdfebb0ee15064133d36a91d64 Author: Christophe Lyon Date: Fri Sep 11 11:53:15 2020 +0000 libstdc++: include/bits/regex_error.h: Avoid warning with -fno-exceptions. 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. (cherry picked from commit b32d2ea8c29203519fbd9c5e90b06941e7cd75f3) Diff: --- 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 b150002ceff..a5b553862ce 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