This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]