On Wed, Dec 2, 2020 at 7:47 AM Ian Lance Taylor <i...@golang.org> wrote: > > 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.
This requires updating a test, which I forgot to do. Committed this patch to mainline. Ian
55ba4ab02661bf4710bd7e58ed0f1b99922cabe9 diff --git a/gcc/testsuite/go.test/test/syntax/semi6.go b/gcc/testsuite/go.test/test/syntax/semi6.go index c1e1cc363a2..9bc730d43d6 100644 --- a/gcc/testsuite/go.test/test/syntax/semi6.go +++ b/gcc/testsuite/go.test/test/syntax/semi6.go @@ -1,13 +1,11 @@ // errorcheck -// Copyright 2010 The Go Authors. All rights reserved. +// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main -type T // ERROR "unexpected semicolon or newline in type declaration" -{ - - +type T1 // ERROR "newline in type declaration" +type T2 /* // ERROR "(semicolon.*|EOF) in type declaration" */ \ No newline at end of file