aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl2.cc')
-rw-r--r--gcc/cp/decl2.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index 9e135af..8ec9740 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -1468,7 +1468,8 @@ is_late_template_attribute (tree attr, tree decl)
{
tree name = get_attribute_name (attr);
tree args = TREE_VALUE (attr);
- const struct attribute_spec *spec = lookup_attribute_spec (name);
+ const struct attribute_spec *spec
+ = lookup_attribute_spec (TREE_PURPOSE (attr));
tree arg;
if (!spec)
@@ -1512,7 +1513,9 @@ is_late_template_attribute (tree attr, tree decl)
second and following arguments. Attributes like mode, format,
cleanup and several target specific attributes aren't late
just because they have an IDENTIFIER_NODE as first argument. */
- if (arg == args && attribute_takes_identifier_p (name)
+ if (arg == args
+ && get_attribute_namespace (attr) == gnu_identifier
+ && attribute_takes_identifier_p (name)
&& identifier_p (t))
continue;