From db3ec4f239ad855066beb7f2942f6c736727131b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 4 Feb 2010 21:31:30 -0800 Subject: [PATCH] Match gccgo error messages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bug121.go:12:3: error: name list not allowed in interface type bug121.go:16:2: error: expected signature or type name semi1.go:10:76: error: unexpected semicolon or newline before ‘{’ semi1.go:10:5: error: reference to undefined name ‘x’ semi1.go:10:8: error: reference to undefined name ‘y’ semi1.go:12:3: error: reference to undefined name ‘z’ semi2.go:10:79: error: unexpected semicolon or newline before ‘{’ semi2.go:10:9: error: reference to undefined name ‘x’ semi3.go:10:79: error: unexpected semicolon or newline before ‘{’ semi3.go:10:6: error: reference to undefined name ‘x’ semi3.go:10:9: error: reference to undefined name ‘y’ semi3.go:10:12: error: reference to undefined name ‘z’ semi3.go:12:3: error: reference to undefined name ‘z’ semi4.go:11:2: error: unexpected semicolon or newline before ‘{’ semi4.go:10:6: error: reference to undefined name ‘x’ semi4.go:12:3: error: reference to undefined name ‘z’ semi5.go:10:1: error: unexpected semicolon or newline before ‘{’ semi7.go:11:2: error: unexpected semicolon or newline before ‘else’ semi7.go:10:5: error: reference to undefined name ‘x’ slice.go:9:11: error: missing lower bound in slice expression slice.go:9:9: error: reference to undefined name ‘y’ slice.go:9:12: error: reference to undefined name ‘z’ R=rsc CC=golang-dev https://golang.org/cl/201061 --- test/fixedbugs/bug121.go | 2 +- test/syntax/semi1.go | 4 ++-- test/syntax/semi2.go | 2 +- test/syntax/semi3.go | 4 ++-- test/syntax/semi4.go | 6 +++--- test/syntax/semi5.go | 2 +- test/syntax/semi7.go | 4 ++-- test/syntax/slice.go | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/fixedbugs/bug121.go b/test/fixedbugs/bug121.go index 71d3ee4252e..15c8451da93 100644 --- a/test/fixedbugs/bug121.go +++ b/test/fixedbugs/bug121.go @@ -9,7 +9,7 @@ package main type T func() type I interface { - f, g (); // ERROR "syntax|signature" + f, g (); // ERROR "name list not allowed" } type J interface { diff --git a/test/syntax/semi1.go b/test/syntax/semi1.go index 5ec776bba6b..547d9bf7995 100644 --- a/test/syntax/semi1.go +++ b/test/syntax/semi1.go @@ -7,8 +7,8 @@ package main func main() { - if x; y // ERROR "unexpected semicolon or newline before {" + if x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined" { - z + z // GCCGO_ERROR "undefined" diff --git a/test/syntax/semi2.go b/test/syntax/semi2.go index 14800a33e7e..28d1d3906dd 100644 --- a/test/syntax/semi2.go +++ b/test/syntax/semi2.go @@ -7,7 +7,7 @@ package main func main() { - switch x; y // ERROR "unexpected semicolon or newline before {" + switch x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined" { z diff --git a/test/syntax/semi3.go b/test/syntax/semi3.go index d8e037fdc01..ab5941bda5b 100644 --- a/test/syntax/semi3.go +++ b/test/syntax/semi3.go @@ -7,8 +7,8 @@ package main func main() { - for x; y; z // ERROR "unexpected semicolon or newline before {" + for x; y; z // ERROR "unexpected semicolon or newline before .?{.?|undefined" { - z + z // GCCGO_ERROR "undefined" diff --git a/test/syntax/semi4.go b/test/syntax/semi4.go index 81134c19b4e..7a9c2956e72 100644 --- a/test/syntax/semi4.go +++ b/test/syntax/semi4.go @@ -7,8 +7,8 @@ package main func main() { - for x - { // ERROR "unexpected semicolon or newline before {" - z + for x // GCCGO_ERROR "undefined" + { // ERROR "unexpected semicolon or newline before .?{.?" + z // GCCGO_ERROR "undefined" diff --git a/test/syntax/semi5.go b/test/syntax/semi5.go index 0ba4df8d6de..5f8ccc688f7 100644 --- a/test/syntax/semi5.go +++ b/test/syntax/semi5.go @@ -7,7 +7,7 @@ package main func main() -{ // ERROR "unexpected semicolon or newline before {" +{ // ERROR "unexpected semicolon or newline before .?{.?" diff --git a/test/syntax/semi7.go b/test/syntax/semi7.go index a4271ddc5c0..5a7b3ff4cc8 100644 --- a/test/syntax/semi7.go +++ b/test/syntax/semi7.go @@ -7,8 +7,8 @@ package main func main() { - if x { } - else { } // ERROR "unexpected semicolon or newline before else" + if x { } // GCCGO_ERROR "undefined" + else { } // ERROR "unexpected semicolon or newline before .?else.?" } diff --git a/test/syntax/slice.go b/test/syntax/slice.go index 4bc5d4d8d2a..7675ca18798 100644 --- a/test/syntax/slice.go +++ b/test/syntax/slice.go @@ -6,4 +6,4 @@ package main -var x = y[:z] // ERROR "missing lower bound in slice expression" +var x = y[:z] // ERROR "missing lower bound in slice expression|undefined"