compiler: Better error message for invalid use of predeclared function.

From-SVN: r183466
This commit is contained in:
Ian Lance Taylor 2012-01-24 07:00:15 +00:00
parent a7a790e9ec
commit a023688237

View File

@ -1328,7 +1328,8 @@ Func_expression::get_tree_without_closure(Gogo* gogo)
// can't take their address.
if (fntype->is_builtin())
{
error_at(this->location(), "invalid use of special builtin function %qs",
error_at(this->location(),
"invalid use of special builtin function %qs; must be called",
this->function_->name().c_str());
return error_mark_node;
}