diff options
author | Jason Merrill <jason@redhat.com> | 2014-04-01 13:49:38 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-04-01 13:49:38 -0400 |
commit | 2982147e0fd2dd4c280b7b68a5b1d784a7a077b1 (patch) | |
tree | c54130f7a2a0a694cfbc8ec485ff5ca05b1525c4 /gcc/cp/decl2.c | |
parent | 2bcbca7e7c8f6e1c750d23134af9706fce360dd5 (diff) | |
download | gcc-2982147e0fd2dd4c280b7b68a5b1d784a7a077b1.zip gcc-2982147e0fd2dd4c280b7b68a5b1d784a7a077b1.tar.gz gcc-2982147e0fd2dd4c280b7b68a5b1d784a7a077b1.tar.bz2 |
re PR c++/60642 (Unclear diagnostic with invalid use of abi_tag attribute on explicit instantiation)
PR c++/60642
* decl2.c (is_late_template_attribute): Don't defer abi_tag.
* mangle.c (write_unqualified_name): Fix abi_tag on templates.
* pt.c (get_template_info): Handle NAMESPACE_DECL.
(most_general_template): Handle more kinds of template.
* tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
instantiations and specializations.
From-SVN: r208992
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index dfc532d..6c52e53 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1169,8 +1169,9 @@ is_late_template_attribute (tree attr, tree decl) /* Also defer most attributes on dependent types. This is not necessary in all cases, but is the better default. */ else if (dependent_type_p (type) - /* But attribute visibility specifically works on - templates. */ + /* But attributes abi_tag and visibility specifically apply + to templates. */ + && !is_attribute_p ("abi_tag", name) && !is_attribute_p ("visibility", name)) return true; else |