compiler: don't warn for print()

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.

Change-Id: I11710ae38478d1860cf8e2708bec8b0f7e1b8373
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384355
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/go/expressions.cc b/go/expressions.cc
index 3f59765..1b3b3bf 100644
--- a/go/expressions.cc
+++ b/go/expressions.cc
@@ -10332,16 +10332,7 @@
     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();