re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 18 Mar 2015 18:08:29 +0000 (18:08 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 18 Mar 2015 18:08:29 +0000 (18:08 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/gnu/messages_members.cc
libstdc++-v3/include/ext/codecvt_specializations.h
libstdc++-v3/src/c++11/cxx11-ios_failure.cc
libstdc++-v3/src/c++11/cxx11-shim_facets.cc
libstdc++-v3/src/c++11/future.cc
libstdc++-v3/src/c++11/system_error.cc

index 534927f..4fe0c64 100644 (file)
@@ -1,5 +1,21 @@
 2015-03-18  Jonathan Wakely  <jwakely@redhat.com>
 
+       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  <jwakely@redhat.com>
+
        PR libstdc++/13631
        * config/locale/gnu/messages_members.cc (get_glibc_msg): Fix fallback
        implementation for old glibc. Fix whitespace.
index 2e6122d..c90499e 100644 (file)
@@ -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<Catalog_info*> _M_infos;
   };
 
+  _GLIBCXX_DEFAULT_ABI_TAG
   Catalogs&
   get_catalogs()
   {
index a24adfc..d9f6630 100644 (file)
@@ -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<encoding_state> for the position type, all other
   // bits equivalent to the required char_traits instantiations.
   template<typename _CharT>
-    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<state_type>           pos_type;
index e1c8d4e..b0a7c46 100644 (file)
@@ -41,6 +41,7 @@ namespace
     name() const noexcept
     { return "iostream"; }
 
+    _GLIBCXX_DEFAULT_ABI_TAG
     virtual std::string message(int __ec) const
     {
       std::string __msg;
index 82bdf6f..a32b9f0 100644 (file)
@@ -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<typename C>
+      _GLIBCXX_DEFAULT_ABI_TAG
       operator basic_string<C>() const
       {
        if (!_M_dtor)
@@ -226,7 +227,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   namespace // unnamed
   {
     template<typename _CharT>
-      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<typename _CharT>
-      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<typename _CharT>
-      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<typename _CharT, bool _Intl>
-      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<typename _CharT>
-      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<typename _CharT>
-      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<typename _CharT>
-      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;
index 3cf503b..21dbd8a 100644 (file)
@@ -32,6 +32,7 @@ namespace
     name() const noexcept
     { return "future"; }
 
+    _GLIBCXX_DEFAULT_ABI_TAG
     virtual std::string message(int __ec) const
     {
       std::string __msg;
index 71f5c8b..b7ac1f8 100644 (file)
@@ -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() { }