From: redi Date: Mon, 18 Apr 2016 15:44:12 +0000 (+0000) Subject: Add attribute((unused)) in libstdc++ headers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bf3dcf3c4a96d6e0c9620baf29a79944346c915;p=thirdparty%2Fgcc.git Add attribute((unused)) in libstdc++ headers * include/bits/locale_facets.h (ctype::do_narrow): Add attribute to unused parameter. * include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235152 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5f47dcdbf99a..470818d0d295 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2016-04-18 Jonathan Wakely + * include/bits/locale_facets.h (ctype::do_narrow): Add attribute to + unused parameter. + * include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise. + * include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare warnings. diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index e3e206b7d496..eda07b64e1cf 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -1128,7 +1128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return The converted char. */ virtual char - do_narrow(char_type __c, char __dfault) const + do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const { return __c; } /** @@ -1155,7 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, - char __dfault, char* __to) const + char __dfault __attribute__((__unused__)), char* __to) const { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; diff --git a/libstdc++-v3/include/bits/regex_automaton.h b/libstdc++-v3/include/bits/regex_automaton.h index 07158c4926b7..c29fbd9ab126 100644 --- a/libstdc++-v3/include/bits/regex_automaton.h +++ b/libstdc++-v3/include/bits/regex_automaton.h @@ -241,7 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _StateIdT - _M_insert_alt(_StateIdT __next, _StateIdT __alt, bool __neg) + _M_insert_alt(_StateIdT __next, _StateIdT __alt, + bool __neg __attribute__((__unused__))) { _StateT __tmp(_S_opcode_alternative); // It labels every quantifier to make greedy comparison easier in BFS