diff options
author | Jason Merrill <jason@redhat.com> | 2015-03-19 15:31:48 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-03-19 15:31:48 -0400 |
commit | 7cb73573606d5b0881b0af778a81b5b9c1569f36 (patch) | |
tree | 1366bd2f145ea6b0f0e6fc74fb3092fea4a40db4 /libstdc++-v3/src | |
parent | 9b65e171edf31cd83fd075f6ed4f3943ebecc505 (diff) | |
download | gcc-7cb73573606d5b0881b0af778a81b5b9c1569f36.zip gcc-7cb73573606d5b0881b0af778a81b5b9c1569f36.tar.gz gcc-7cb73573606d5b0881b0af778a81b5b9c1569f36.tar.bz2 |
re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
PR c++/65046
Automatically propagate ABI tags to variables and functions
from their (return) type.
* class.c (check_tag): Handle variables and functions.
(mark_or_check_attr_tags): Split out from find_abi_tags_r.
(mark_or_check_tags): Likewise.
(mark_abi_tags): Use it. Rename from mark_type_abi_tags.
(check_abi_tags): Add single argument overload for decls.
Handle inheriting tags for decls.
* mangle.c (write_mangled_name): Call it.
(mangle_return_type_p): Split out from write_encoding.
(unmangled_name_p): Split out from write_mangled_name.
(write_mangled_name): Ignore abi_tag on namespace.
* cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
* parser.c (cp_parser_namespace_definition): Set it.
* name-lookup.c (handle_namespace_attrs): Use arguments. Warn
about abi_tag attribute on non-inline namespace.
* tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
(handle_abi_tag_attribute): Allow tags on variables.
From-SVN: r221521
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++11/cxx11-shim_facets.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/libstdc++-v3/src/c++11/cxx11-shim_facets.cc b/libstdc++-v3/src/c++11/cxx11-shim_facets.cc index a32b9f0..4e30088 100644 --- a/libstdc++-v3/src/c++11/cxx11-shim_facets.cc +++ b/libstdc++-v3/src/c++11/cxx11-shim_facets.cc @@ -227,8 +227,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace // unnamed { template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG numpunct_shim - : std::numpunct<_CharT>, facet::__shim + struct numpunct_shim : std::numpunct<_CharT>, facet::__shim { typedef typename numpunct<_CharT>::__cache_type __cache_type; @@ -252,8 +251,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG collate_shim - : std::collate<_CharT>, facet::__shim + struct collate_shim : std::collate<_CharT>, facet::__shim { typedef basic_string<_CharT> string_type; @@ -278,8 +276,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG time_get_shim - : std::time_get<_CharT>, facet::__shim + struct 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; @@ -333,8 +330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT, bool _Intl> - struct _GLIBCXX_DEFAULT_ABI_TAG moneypunct_shim - : std::moneypunct<_CharT, _Intl>, facet::__shim + struct moneypunct_shim : std::moneypunct<_CharT, _Intl>, facet::__shim { typedef typename moneypunct<_CharT, _Intl>::__cache_type __cache_type; @@ -361,8 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG money_get_shim - : std::money_get<_CharT>, facet::__shim + struct 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; @@ -403,8 +398,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG money_put_shim - : std::money_put<_CharT>, facet::__shim + struct 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; @@ -433,8 +427,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template<typename _CharT> - struct _GLIBCXX_DEFAULT_ABI_TAG messages_shim - : std::messages<_CharT>, facet::__shim + struct messages_shim : std::messages<_CharT>, facet::__shim { typedef messages_base::catalog catalog; typedef basic_string<_CharT> string_type; |