c++: Fix decltype of empty pack expansion of parm.
authorJason Merrill <jason@redhat.com>
Wed, 5 Feb 2020 22:59:28 +0000 (17:59 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 5 Feb 2020 23:38:23 +0000 (18:38 -0500)
commitf6bef09771cf93e695cf719fb43db8c43e31acf5
tree935e12f4206a452407e80aef63da78fef59f8aec
parentba67231631b83b0b4dc499a42e07104233ee4b03
c++: Fix decltype of empty pack expansion of parm.

In unevaluated context, we only substitute a single PARM_DECL, not the
entire chain, but the handling of an empty pack expansion was missing that
check.

PR c++/93140
* pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in
handling of TREE_CHAIN for empty pack.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/variadic-parm1.C [new file with mode: 0644]