This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Mention function name in cmplx type error
- 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: Tue, 31 Aug 2010 11:29:42 -0700
- Subject: [gccgo] Mention function name in cmplx type error
This small patch changes gccgo to mention the function name when
reporting a type error in the use of the predeclared function cmplx.
Committed to gccgo branch.
Ian
diff -r 79786d3fc04a go/expressions.cc
--- a/go/expressions.cc Tue Aug 31 11:08:59 2010 -0700
+++ b/go/expressions.cc Tue Aug 31 11:27:25 2010 -0700
@@ -7083,9 +7083,10 @@
this->set_is_error();
else if (!Type::are_identical(args->front()->type(),
args->back()->type(), NULL))
- this->report_error(_("arguments must have identical types"));
+ this->report_error(_("cmplx arguments must have identical types"));
else if (args->front()->type()->float_type() == NULL)
- this->report_error(_("arguments must have floating-point type"));
+ this->report_error(_("cmplx arguments must have "
+ "floating-point type"));
}
break;