We used to warn for calls to print(), because it doesn't do anything.
However, a Go 1.18 test uses that call, and it is valid Go. Change
the compiler to just accept it and compile it; this will produce calls
to printlock and printunlock, and nothing else.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384355
-263e8d2a2ab57c6f2b3035f370d40476bda87c9f
+b0dcd2d1e5e73952408b9f2d4d86ae12d102b20c
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
case BUILTIN_PRINTLN:
{
const Expression_list* args = this->args();
- if (args == NULL)
- {
- if (this->code_ == BUILTIN_PRINT)
- go_warning_at(this->location(), 0,
- "no arguments for built-in function %<%s%>",
- (this->code_ == BUILTIN_PRINT
- ? "print"
- : "println"));
- }
- else
+ if (args != NULL)
{
for (Expression_list::const_iterator p = args->begin();
p != args->end();