aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-10-16 17:58:35 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-10-16 17:58:35 -0400
commit55ea5ddf26a4377d541244194ceb0b72c675a98f (patch)
tree942d41086fc0b8f60204d96ade1f8de1a6706578 /gcc/cp
parent1a1f2bc5139648b2559404328e0e31966ebb8732 (diff)
downloadgcc-55ea5ddf26a4377d541244194ceb0b72c675a98f.zip
gcc-55ea5ddf26a4377d541244194ceb0b72c675a98f.tar.gz
gcc-55ea5ddf26a4377d541244194ceb0b72c675a98f.tar.bz2
pt.c (apply_late_template_attributes): Use attribute_takes_identifier_p.
* pt.c (apply_late_template_attributes): Use attribute_takes_identifier_p. From-SVN: r203727
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2091b9f..9b15f55 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2013-10-16 Jason Merrill <jason@redhat.com>
+ * pt.c (apply_late_template_attributes): Use
+ attribute_takes_identifier_p.
+
* error.c (dump_exception_spec): Print "noexcept" rather than
"noexcept (true)".
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index a1eb7a2..e9c3ce2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8610,10 +8610,7 @@ apply_late_template_attributes (tree *decl_p, tree attributes, int attr_flags,
pass it through tsubst. Attributes like mode, format,
cleanup and several target specific attributes expect it
unmodified. */
- else if (TREE_VALUE (t)
- && TREE_CODE (TREE_VALUE (t)) == TREE_LIST
- && TREE_VALUE (TREE_VALUE (t))
- && identifier_p (TREE_VALUE (TREE_VALUE (t))))
+ else if (attribute_takes_identifier_p (TREE_PURPOSE (t)))
{
tree chain
= tsubst_expr (TREE_CHAIN (TREE_VALUE (t)), args, complain,