* pt.c (lookup_template_class_1): Copy abi_tag.

From-SVN: r213762
This commit is contained in:
Jason Merrill 2014-08-08 14:17:21 -04:00 committed by Jason Merrill
parent ff09769fac
commit a6b0c7bc45
3 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2014-08-08 Jason Merrill <jason@redhat.com>
* pt.c (lookup_template_class_1): Copy abi_tag.
2014-08-08 Kai Tietz <ktietz@redhat.com>
* semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport

View File

@ -7813,6 +7813,12 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
}
}
if (OVERLOAD_TYPE_P (t)
&& !DECL_ALIAS_TEMPLATE_P (gen_tmpl))
if (tree attributes
= lookup_attribute ("abi_tag", TYPE_ATTRIBUTES (template_type)))
TYPE_ATTRIBUTES (t) = attributes;
/* Let's consider the explicit specialization of a member
of a class template specialization that is implicitly instantiated,
e.g.:

View File

@ -0,0 +1,9 @@
// { dg-options "-Wabi-tag" }
template<class T>
struct __attribute ((__abi_tag__("cxx11"))) list // { dg-message "list" }
{ };
struct X { // { dg-warning "abi tag" }
list<int> l; // { dg-message "X::l" }
};