This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Avoid knock-on errors.
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 30 Jan 2010 10:18:08 -0800
- Subject: [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;
}