diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-12-01 19:15:57 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-12-02 07:47:06 -0800 |
commit | c7932d5626a81a35686a3992b5a02570aba5cd0b (patch) | |
tree | bdfb4df0d0676bebe7eb18021f670fd578bfd74c /gcc | |
parent | f0a2d11f8ad85bfdedb79bc47bd34bd08e38f81f (diff) | |
download | gcc-c7932d5626a81a35686a3992b5a02570aba5cd0b.zip gcc-c7932d5626a81a35686a3992b5a02570aba5cd0b.tar.gz gcc-c7932d5626a81a35686a3992b5a02570aba5cd0b.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 1 |
2 files changed, 1 insertions, 2 deletions
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()) |