aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-06-20 10:40:10 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-20 10:40:10 -0400
commit2602f8fe61dcf2388890bbbdb938e46ce9d2936b (patch)
tree74980f30878d41612c0e9099dcad2a36e7e9af6a /gcc/cp/call.c
parentdd70e080ff7137c110f80fb43591a2d6796f1903 (diff)
downloadgcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.zip
gcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.tar.gz
gcc-2602f8fe61dcf2388890bbbdb938e46ce9d2936b.tar.bz2
re PR c++/49205 ([C++0x] Default constructor with pack expansion parameter not detected)
PR c++/49205 * call.c (sufficient_parms_p): Allow parameter packs too. From-SVN: r175214
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 05bf983..09d73d0 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -534,15 +534,16 @@ null_ptr_cst_p (tree t)
return false;
}
-/* Returns nonzero if PARMLIST consists of only default parms and/or
- ellipsis. */
+/* Returns nonzero if PARMLIST consists of only default parms,
+ ellipsis, and/or undeduced parameter packs. */
bool
sufficient_parms_p (const_tree parmlist)
{
for (; parmlist && parmlist != void_list_node;
parmlist = TREE_CHAIN (parmlist))
- if (!TREE_PURPOSE (parmlist))
+ if (!TREE_PURPOSE (parmlist)
+ && !PACK_EXPANSION_P (TREE_VALUE (parmlist)))
return false;
return true;
}