public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gccgo] Mention function name in cmplx type error
@ 2010-08-31 19:36 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2010-08-31 19:36 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cmplx --]
[-- Type: text/x-diff, Size: 672 bytes --]

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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-31 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31 19:36 [gccgo] Mention function name in cmplx type error Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).