From: Ian Lance Taylor Date: Wed, 2 Dec 2020 03:15:57 +0000 (-0800) Subject: compiler: don't advance past unexpected semicolon X-Git-Tag: upstream/12.2.0~11288 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7932d5626a81a35686a3992b5a02570aba5cd0b;p=platform%2Fupstream%2Fgcc.git 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 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 45f62b3..8cba9aa 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 c9a5485..b062a47 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())