https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87322

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is because we have:
13425           /* If cp_unevaluated_operand is set, we're just looking for a
13426              single dummy parameter, so don't keep going.  */
13427           if (DECL_CHAIN (t) && !cp_unevaluated_operand)
13428             DECL_CHAIN (r) = tsubst (DECL_CHAIN (t), args,
13429                                      complain, DECL_CHAIN (t));
and if cp_unevaluated_operand is true, we don't actually tsubst anything but
the first argument.

cp_unevaluated_operand is set in this case in:
        ++cp_unevaluated_operand;
        ++c_inhibit_evaluation_warnings;

        type = tsubst_copy_and_build (DECLTYPE_TYPE_EXPR (t), args,
                                      complain|tf_decltype, in_decl,
                                      /*function_p*/false,
                                      /*integral_constant_expression*/false);
...
        --cp_unevaluated_operand;
        --c_inhibit_evaluation_warnings;

The line 13427 stuff has been added for PR53498, I bet we don't want that in
this case though.

Reply via email to