From c7932d5626a81a35686a3992b5a02570aba5cd0b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 1 Dec 2020 19:15:57 -0800 Subject: [PATCH] compiler: don't advance past unexpected semicolon 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. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274439 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/parse.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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()) -- 2.30.2