This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Better error for invalid use of builtin
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Mon, 23 Jan 2012 23:00:22 -0800
- Subject: Go patch committed: Better error for invalid use of builtin
This patch to the Go compiler improves the error message for the invalid
use of a special builtin function like unsafe.Sizeof. Bootstrapped and
ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
diff -r c1acc6a7e12a go/expressions.cc
--- a/go/expressions.cc Mon Jan 23 15:53:43 2012 -0800
+++ b/go/expressions.cc Mon Jan 23 22:58:26 2012 -0800
@@ -1328,7 +1328,8 @@
// 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;
}