diff options
author | Jason Merrill <jason@redhat.com> | 2010-02-12 14:46:29 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-12 14:46:29 -0500 |
commit | 96b4a0b57e64c29c6232ac80765f93a16ff6293a (patch) | |
tree | df621a5758c367f798b27ed22c08d0bdde486143 /gcc/cp | |
parent | 9ab999338b1a5b3fa79f59dbe68e9b13673e7e9d (diff) | |
download | gcc-96b4a0b57e64c29c6232ac80765f93a16ff6293a.zip gcc-96b4a0b57e64c29c6232ac80765f93a16ff6293a.tar.gz gcc-96b4a0b57e64c29c6232ac80765f93a16ff6293a.tar.bz2 |
re PR c++/43054 ([C++0x] ambiguous overload from identical declarations using decltype)
PR c++/43054
* tree.c (cp_tree_equal): Correct CALL_EXPR logic, handle
EXPR_PACK_EXPANSION.
From-SVN: r156737
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/tree.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 18d1232..ba2fd04 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-12 Jason Merrill <jason@redhat.com> + + PR c++/43054 + * tree.c (cp_tree_equal): Correct CALL_EXPR logic, handle + EXPR_PACK_EXPANSION. + 2010-02-12 Jakub Jelinek <jakub@redhat.com> PR c++/43033 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 678c7dd..89ac3dd 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2060,7 +2060,9 @@ cp_tree_equal (tree t1, tree t2) arg2 = next_call_expr_arg (&iter2)) if (!cp_tree_equal (arg1, arg2)) return false; - return (arg1 || arg2); + if (arg1 || arg2) + return false; + return true; } case TARGET_EXPR: @@ -2197,6 +2199,10 @@ cp_tree_equal (tree t1, tree t2) return same_type_p (TRAIT_EXPR_TYPE1 (t1), TRAIT_EXPR_TYPE1 (t2)) && same_type_p (TRAIT_EXPR_TYPE2 (t1), TRAIT_EXPR_TYPE2 (t2)); + case EXPR_PACK_EXPANSION: + return cp_tree_equal (PACK_EXPANSION_PATTERN (t1), + PACK_EXPANSION_PATTERN (t2)); + default: break; } |