We can stop it even sooner:

  /* If the next token is an ellipsis, and we don't already have it
     marked as a parameter pack, then we have a parameter pack (that
     has no declarator).  */
  if (!*is_parameter_pack
      && cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)
      && declarator_can_be_parameter_pack (parameter_declarator->declarator))

We shouldn't even consider this if there was a default argument.

Jason

Reply via email to