Expression*
Builtin_call_expression::do_lower(Gogo* gogo, Named_object* function, int)
{
+ if (this->is_varargs() && this->code_ != BUILTIN_APPEND)
+ {
+ this->report_error(_("invalid use of %<...%> with builtin function"));
+ return Expression::make_error(this->location());
+ }
+
if (this->code_ == BUILTIN_NEW)
{
const Expression_list* args = this->args();
this->advance_token();
Expression* expr = this->expression(PRECEDENCE_NORMAL, false, true,
NULL);
+ if (this->peek_token()->is_op(OPERATOR_ELLIPSIS))
+ {
+ error_at(this->location(),
+ "invalid use of %<...%> in type conversion");
+ this->advance_token();
+ }
if (!this->peek_token()->is_op(OPERATOR_RPAREN))
error_at(this->location(), "expected %<)%>");
else