From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 211A7398740F for ; Fri, 11 Sep 2020 12:55:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 211A7398740F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-7QuMza8gNJaYFlgbvyoRBQ-1; Fri, 11 Sep 2020 08:55:16 -0400 X-MC-Unique: 7QuMza8gNJaYFlgbvyoRBQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 131DE1966334; Fri, 11 Sep 2020 12:55:15 +0000 (UTC) Received: from localhost (unknown [10.33.37.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D13B5D9F3; Fri, 11 Sep 2020 12:55:14 +0000 (UTC) Date: Fri, 11 Sep 2020 13:55:13 +0100 From: Jonathan Wakely To: Christophe Lyon Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++-v3/include/bits/regex_error.h: Avoid warning with -fno-exceptions. Message-ID: <20200911125513.GN6061@redhat.com> References: <1599826987-5240-1-git-send-email-christophe.lyon@linaro.org> MIME-Version: 1.0 In-Reply-To: <1599826987-5240-1-git-send-email-christophe.lyon@linaro.org> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 12:55:19 -0000 On 11/09/20 12:23 +0000, Christophe Lyon via Libstdc++ wrote: >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. OK, thanks. >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 09e9288..88f3f811 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.7.4 >