diff mbox

[gccgo] Mention function name in cmplx type error

Message ID mcrsk1ueiuh.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Aug. 31, 2010, 6:29 p.m. UTC
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 mbox

Patch

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;