aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-06-30 22:41:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-06-30 22:41:29 +0200
commitb2febff9b75efcb419fcf5d8d821175300fa00b5 (patch)
tree850a4f25e3444247fa6f8223910e36ae7337c920 /gcc/cp/decl2.c
parent727683a51c938a58cc7bdb7ea6bebed63521c5b4 (diff)
downloadgcc-b2febff9b75efcb419fcf5d8d821175300fa00b5.zip
gcc-b2febff9b75efcb419fcf5d8d821175300fa00b5.tar.gz
gcc-b2febff9b75efcb419fcf5d8d821175300fa00b5.tar.bz2
re PR c++/36662 (vector vs template)
PR c++/36662 * decl2.c (is_late_template_attribute): If the first attribute argument is IDENTIFIER_NODE, don't consider it when checking if arguments are value or type dependent. * g++.dg/ext/altivec-16.C: New test. From-SVN: r137287
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index ee229f4..a5ece9a 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1,6 +1,7 @@
/* Process declarations and variables for C++ compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
@@ -1005,6 +1006,14 @@ is_late_template_attribute (tree attr, tree decl)
for (arg = args; arg; arg = TREE_CHAIN (arg))
{
tree t = TREE_VALUE (arg);
+
+ /* If the first attribute argument is an identifier, only consider
+ 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 && TREE_CODE (t) == IDENTIFIER_NODE)
+ continue;
+
if (value_dependent_expression_p (t)
|| type_dependent_expression_p (t))
return true;