On Tue, Oct 31, 2017 at 5:45 AM, Paolo Carlini <paolo.carl...@oracle.com> wrote: > this ICE on valid seems rather easy to fix, one of those bugs where we > aren't propagating the tsubst_flags_t argument. In this case, we aren't > propagating from tsubst_pack_expansion to make_pack_expansion. Doing it, > fixes the ICE and we actually accept the code as we should. In general, > make_pack_expansion is also called from many other places, eg, the parser, > thus I'm using a default tf_warning_or_error for it. Similarly to other past > fixes, I ended up adding tsubst_flags_t parameters to a few other functions > in pt.c, eg template_parms_to_args, which eventually use make_pack_expansion > without propagating. > > There are a couple of places where I'm proposing passing a /tf_none/ to > template_parms_to_args: is_compatible_template_arg, which is currently > calling template_parms_to_args and passing the result together with a > tf_none to tsubst_constraint_info; convert_generic_types_to_packs, which is > currently calling template_parms_to_args and passing the result (via > add_to_template_args) together with tf_none to tsubst. Of course the > "conservative" choice would be instead passing tf_warning_or_error.
Do we really need to add tsubst_flags_t to template_parm_to_arg and friends? It should never produce an error. Jason