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] Improve error message for incompatible types


This is a minor fix to improve the error message for incompatible
types when one or both of the types is defined in a different
package.  Committed to gccgo branch.

Ian

diff -r 495fef5fa8e7 go/types.cc
--- a/go/types.cc	Mon Feb 01 15:19:49 2010 -0800
+++ b/go/types.cc	Mon Feb 01 16:06:07 2010 -0800
@@ -5686,8 +5686,8 @@
 			+ 100);
 	  char* buf = new char[len];
 	  snprintf(buf, len, _("cannot use type %s as type %s"),
-		   t->named_type()->name().c_str(),
-		   this->name().c_str());
+		   t->named_type()->message_name().c_str(),
+		   this->message_name().c_str());
 	  reason->assign(buf);
 	  delete[] buf;
 	}

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