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] Avoid knock-on errors.


Don't give an error about assignment LHS if it is already erroneous.
Committed to gccgo branch.

Ian

diff -r 3ca012094c2f go/statements.cc
--- a/go/statements.cc	Fri Jan 29 22:36:29 2010 -0800
+++ b/go/statements.cc	Sat Jan 30 10:16:27 2010 -0800
@@ -514,7 +514,8 @@
 {
   if (!this->lhs_->is_lvalue())
     {
-      this->report_error(_("invalid left hand side of assignment"));
+      if (!this->lhs_->type()->is_error_type())
+	this->report_error(_("invalid left hand side of assignment"));
       return;
     }
 

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