diff options
author | Douglas Gregor <doug.gregor@gmail.com> | 2007-11-05 12:50:21 +0000 |
---|---|---|
committer | Doug Gregor <dgregor@gcc.gnu.org> | 2007-11-05 12:50:21 +0000 |
commit | 2afad0f6bbf0a98ac7189ca9dbcaef13594e674e (patch) | |
tree | f913fbca909f5445d4d4fb618053ce82b8c78adf /gcc/cp | |
parent | f139f5faa7063323dd3b00a0f6515e0e0683edb6 (diff) | |
download | gcc-2afad0f6bbf0a98ac7189ca9dbcaef13594e674e.zip gcc-2afad0f6bbf0a98ac7189ca9dbcaef13594e674e.tar.gz gcc-2afad0f6bbf0a98ac7189ca9dbcaef13594e674e.tar.bz2 |
re PR c++/33939 (Rvalue references not deduced correctly in vararg function templates)
2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33939
* pt.c (unify_pack_expansion): bring handling of function call
arguments into line with type_unification_real.
2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33939
* g++.dg/cpp0x/variadic-rref.C: New.
From-SVN: r129900
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 78ff8f8..8923b24 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-05 Douglas Gregor <doug.gregor@gmail.com> + + PR c++/33939 + * pt.c (unify_pack_expansion): bring handling of function call + arguments into line with type_unification_real. + 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * typeck.c (build_binary_op): Use pedwarn instead of error for diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e9e7789..9c29f81 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12280,6 +12280,7 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms, /* Unify the pattern with the current argument. */ { tree arg = TREE_VEC_ELT (packed_args, i); + tree arg_expr = NULL_TREE; int arg_strict = strict; bool skip_arg_p = false; @@ -12330,7 +12331,8 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms, if (!skip_arg_p) { - arg = TREE_TYPE (arg); + arg_expr = arg; + arg = unlowered_expr_type (arg); if (arg == error_mark_node) return 1; } @@ -12340,7 +12342,8 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms, if (!subr) arg_strict |= - maybe_adjust_types_for_deduction (strict, &parm, &arg, NULL); + maybe_adjust_types_for_deduction (strict, &parm, &arg, + arg_expr); } if (!skip_arg_p) |