* class.c (check_tag): Handle variables and functions.heads/jason/tag-inherit
commit82ea96a59b2d4594fcbfa1894af26878187e2e8c
authorJason Merrill <jason@redhat.com>
Tue, 10 Mar 2015 19:34:49 +0000 (10 15:34 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 13 Mar 2015 18:05:23 +0000 (13 14:05 -0400)
tree60d333cb5a602623fd3e20b81035e3798114c80c
parent9dba8b1d24c82b3347b13eb5f19396c5ecd49988
* 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.
12 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/mangle.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/abi/abi-tag1.C
gcc/testsuite/g++.dg/abi/abi-tag14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/abi-tag4.C
gcc/testsuite/g++.dg/abi/abi-tag8.C
libstdc++-v3/include/bits/c++config