public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-11459] libstdc++: include/bits/regex_error.h: Avoid warning with -fno-exceptions.
@ 2023-06-23 16:12 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-06-23 16:12 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:f0f8cb2a9f6ec5fdfebb0ee15064133d36a91d64

commit r10-11459-gf0f8cb2a9f6ec5fdfebb0ee15064133d36a91d64
Author: Christophe Lyon <christophe.lyon@linaro.org>
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 <torbjorn.svensson@st.com>
                Christophe Lyon  <christophe.lyon@linaro.org>
    
            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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-23 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 16:12 [gcc r10-11459] libstdc++: include/bits/regex_error.h: Avoid warning with -fno-exceptions Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).