This Go frontend patch changes the parser to not advance past an
unexpected semicolon, after it gives an error.  We've already read the
unexpected semicolon, so advancing again causes us to skip the next
token, causing future errors to be out of sync.  Bootstrapped and ran
Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
91bbf4342966cee0f8557068a116c4f2622a3539
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 45f62b3bec5..8cba9aa5a3d 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-2cc5c746ddfbaeb731f10f2232b9a488df12b71e
+81d3afed2b7f7eba4eed4599dfdd10081f67391e
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index c9a5485049f..b062a471008 100644
--- a/gcc/go/gofrontend/parse.cc
+++ b/gcc/go/gofrontend/parse.cc
@@ -1567,7 +1567,6 @@ Parse::type_spec(void*, unsigned int pragmas)
       go_error_at(this->location(),
                  "unexpected semicolon or newline in type declaration");
       type = Type::make_error_type();
-      this->advance_token();
     }
 
   if (type->is_error_type())

Reply via email to