[committed] c++: Fix constexpr if and braced functional cast.

Jason Merrill jason@redhat.com
Sat Feb 15 13:27:00 GMT 2020


On 2/13/20 12:42 AM, Jason Merrill wrote:
> While partially instantiating a generic lambda, we can encounter pack
> expansions or constexpr if where we can't actually do the substitution
> immediately, and instead remember a partial instantiation context
> in *_EXTRA_ARGS.  This includes any local_specializations used in the
> pattern or condition.  In this testcase our tree walk wasn't finding the use
> of i because we weren't walking into the type of a CONSTRUCTOR.  Fixed by
> moving the code for doing that from find_parameter_packs_r into
> cp_walk_subtrees.
> 
> Tested x86_64-pc-linux-gnu, applying to trunk.
> 
> 2020-02-11  Jason Merrill  <jason@redhat.com>
> 
> 	PR c++/92583
> 	PR c++/92654
> 	* tree.c (cp_walk_subtrees): Walk CONSTRUCTOR types here.
> 	* pt.c (find_parameter_packs_r): Not here.

Another place that is redundant with the code in cp_walk_subtrees:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 92583-2.diff
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200215/702bef56/attachment.bin>


More information about the Gcc-patches mailing list