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]

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

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