From: Jonathan Wakely Date: Wed, 18 Mar 2015 18:08:29 +0000 (+0000) Subject: re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=168ad5f5e375612ea0c1ade7e719bb7370516e8e;p=gcc.git re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types) PR c++/65046 * config/locale/gnu/messages_members.cc (Catalog_info, Catalogs, get_catalogs): Add abi-tag. * include/ext/codecvt_specializations.h (encoding_state, encoding_char_traits): Likewise. * src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise. * src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string, numpunct_shim, collate_shim, time_get_shim, moneypunct_shim, money_get_shim, money_put_shim, messages_shim): Likewise. * src/c++11/future.cc (future_error_category::message): Likewise. * src/c++11/system_error.cc (generic_error_category::message, system_error_category::message): Likewise. (__sso_string): Disable -Wabi-tag warnings. From-SVN: r221497 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 534927fc92a..4fe0c645687 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,19 @@ +2015-03-18 Jonathan Wakely + + PR c++/65046 + * config/locale/gnu/messages_members.cc (Catalog_info, Catalogs, + get_catalogs): Add abi-tag. + * include/ext/codecvt_specializations.h (encoding_state, + encoding_char_traits): Likewise. + * src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise. + * src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string, + numpunct_shim, collate_shim, time_get_shim, moneypunct_shim, + money_get_shim, money_put_shim, messages_shim): Likewise. + * src/c++11/future.cc (future_error_category::message): Likewise. + * src/c++11/system_error.cc (generic_error_category::message, + system_error_category::message): Likewise. + (__sso_string): Disable -Wabi-tag warnings. + 2015-03-18 Jonathan Wakely PR libstdc++/13631 diff --git a/libstdc++-v3/config/locale/gnu/messages_members.cc b/libstdc++-v3/config/locale/gnu/messages_members.cc index 2e6122d2ea5..c90499e26a9 100644 --- a/libstdc++-v3/config/locale/gnu/messages_members.cc +++ b/libstdc++-v3/config/locale/gnu/messages_members.cc @@ -46,8 +46,8 @@ namespace typedef messages_base::catalog catalog; - struct Catalog_info - { + struct _GLIBCXX_DEFAULT_ABI_TAG Catalog_info + { Catalog_info(catalog __id, const string& __domain, locale __loc) : _M_id(__id), _M_domain(__domain), _M_locale(__loc) { } @@ -57,7 +57,7 @@ namespace locale _M_locale; }; - class Catalogs + class _GLIBCXX_DEFAULT_ABI_TAG Catalogs { public: Catalogs() : _M_catalog_counter(0) { } @@ -133,6 +133,7 @@ namespace std::vector _M_infos; }; + _GLIBCXX_DEFAULT_ABI_TAG Catalogs& get_catalogs() { diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h index a24adfcfd13..d9f6630ce0f 100644 --- a/libstdc++-v3/include/ext/codecvt_specializations.h +++ b/libstdc++-v3/include/ext/codecvt_specializations.h @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // This includes conversions and comparisons between various character // sets. This object encapsulates data that may need to be shared between // char_traits, codecvt and ctype. - class encoding_state + class _GLIBCXX_DEFAULT_ABI_TAG encoding_state { public: // Types: @@ -207,7 +207,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // associated fpos for the position type, all other // bits equivalent to the required char_traits instantiations. template - struct encoding_char_traits : public std::char_traits<_CharT> + struct _GLIBCXX_DEFAULT_ABI_TAG encoding_char_traits + : public std::char_traits<_CharT> { typedef encoding_state state_type; typedef typename std::fpos pos_type; diff --git a/libstdc++-v3/src/c++11/cxx11-ios_failure.cc b/libstdc++-v3/src/c++11/cxx11-ios_failure.cc index e1c8d4e0139..b0a7c46ab99 100644 --- a/libstdc++-v3/src/c++11/cxx11-ios_failure.cc +++ b/libstdc++-v3/src/c++11/cxx11-ios_failure.cc @@ -41,6 +41,7 @@ namespace name() const noexcept { return "iostream"; } + _GLIBCXX_DEFAULT_ABI_TAG virtual std::string message(int __ec) const { std::string __msg; diff --git a/libstdc++-v3/src/c++11/cxx11-shim_facets.cc b/libstdc++-v3/src/c++11/cxx11-shim_facets.cc index 82bdf6f2ced..a32b9f0b65f 100644 --- a/libstdc++-v3/src/c++11/cxx11-shim_facets.cc +++ b/libstdc++-v3/src/c++11/cxx11-shim_facets.cc @@ -147,6 +147,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // The returned object will match the caller's string ABI, even when the // stored string doesn't. template + _GLIBCXX_DEFAULT_ABI_TAG operator basic_string() const { if (!_M_dtor) @@ -226,7 +227,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace // unnamed { template - struct numpunct_shim : std::numpunct<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG numpunct_shim + : std::numpunct<_CharT>, facet::__shim { typedef typename numpunct<_CharT>::__cache_type __cache_type; @@ -250,7 +252,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct collate_shim : std::collate<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG collate_shim + : std::collate<_CharT>, facet::__shim { typedef basic_string<_CharT> string_type; @@ -275,7 +278,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct time_get_shim : std::time_get<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG time_get_shim + : std::time_get<_CharT>, facet::__shim { typedef typename std::time_get<_CharT>::iter_type iter_type; typedef typename std::time_get<_CharT>::char_type char_type; @@ -329,7 +333,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct moneypunct_shim : std::moneypunct<_CharT, _Intl>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG moneypunct_shim + : std::moneypunct<_CharT, _Intl>, facet::__shim { typedef typename moneypunct<_CharT, _Intl>::__cache_type __cache_type; @@ -356,7 +361,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct money_get_shim : std::money_get<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG money_get_shim + : std::money_get<_CharT>, facet::__shim { typedef typename std::money_get<_CharT>::iter_type iter_type; typedef typename std::money_get<_CharT>::char_type char_type; @@ -397,7 +403,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct money_put_shim : std::money_put<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG money_put_shim + : std::money_put<_CharT>, facet::__shim { typedef typename std::money_put<_CharT>::iter_type iter_type; typedef typename std::money_put<_CharT>::char_type char_type; @@ -426,7 +433,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct messages_shim : std::messages<_CharT>, facet::__shim + struct _GLIBCXX_DEFAULT_ABI_TAG messages_shim + : std::messages<_CharT>, facet::__shim { typedef messages_base::catalog catalog; typedef basic_string<_CharT> string_type; diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc index 3cf503b6b34..21dbd8a685d 100644 --- a/libstdc++-v3/src/c++11/future.cc +++ b/libstdc++-v3/src/c++11/future.cc @@ -32,6 +32,7 @@ namespace name() const noexcept { return "future"; } + _GLIBCXX_DEFAULT_ABI_TAG virtual std::string message(int __ec) const { std::string __msg; diff --git a/libstdc++-v3/src/c++11/system_error.cc b/libstdc++-v3/src/c++11/system_error.cc index 71f5c8b652d..b7ac1f869d4 100644 --- a/libstdc++-v3/src/c++11/system_error.cc +++ b/libstdc++-v3/src/c++11/system_error.cc @@ -41,6 +41,7 @@ namespace name() const noexcept { return "generic"; } + _GLIBCXX_DEFAULT_ABI_TAG virtual string message(int i) const { @@ -56,6 +57,7 @@ namespace name() const noexcept { return "system"; } + _GLIBCXX_DEFAULT_ABI_TAG virtual string message(int i) const { @@ -111,6 +113,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif #if _GLIBCXX_USE_DUAL_ABI +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wabi-tag" // Redefine __sso_string so that we can define and export its members // in terms of the SSO std::string. struct __sso_string @@ -137,6 +141,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __sso_string(__sso_string&&) noexcept; __sso_string& operator=(__sso_string&&) noexcept; }; +#pragma GCC diagnostic pop __sso_string::__sso_string() : _M_str() { }