Commit 91173b89 authored by Ian Lance Taylor's avatar Ian Lance Taylor

Recognize gccgo error messages.

bug039.go:6:7: error: redefinition of 'x'
bug039.go:5:1: note: previous definition of 'x' was here

bug049.go:6:9: error: incompatible types in binary expression

bug062.go:6:7: error: incompatible type in initialization

bug086.go:5:1: error: control reaches end of non-void function

bug103.go:8:2: error: variable has no type

bug121.go:9:2: error: expected signature or type name

bug131.go:7:7: error: incompatible type in initialization

bug165.go:10:8: error: expected complete type

bug171.go:5:1: error: control reaches end of non-void function
bug171.go:6:1: error: control reaches end of non-void function

bug172.go:7:6: error: expected integer type

bug182.go:7:2: error: if statement expects boolean expression

bug183.go:10:5: error: incompatible types in assignment
bug183.go:19:5: error: incompatible types in assignment

R=rsc
DELTA=15  (0 added, 0 deleted, 15 changed)
OCL=33168
CL=33175
parent 7b366e9c
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
package main package main
func main (x int) { func main (x int) { // GCCGO_ERROR "previous"
var x int; // ERROR "redecl" var x int; // ERROR "redecl|redefinition"
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
package main package main
func atom(s string) { func atom(s string) {
if s == nil { // ERROR "nil" if s == nil { // ERROR "nil|incompatible"
return; return;
} }
} }
......
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
package main package main
func main() { func main() {
var s string = nil; // ERROR "illegal|invalid|cannot" var s string = nil; // ERROR "illegal|invalid|incompatible|cannot"
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
package main package main
func f() int { // ERROR "return" func f() int { // ERROR "return|control"
if false { if false {
return 0; return 0;
} }
......
...@@ -9,6 +9,6 @@ package main ...@@ -9,6 +9,6 @@ package main
func f() /* no return type */ {} func f() /* no return type */ {}
func main() { func main() {
x := f(); // ERROR "mismatch|as value" x := f(); // ERROR "mismatch|as value|no type"
} }
...@@ -10,6 +10,6 @@ type T func() ...@@ -10,6 +10,6 @@ type T func()
type I interface { type I interface {
f, g (); f, g ();
h T; // ERROR "syntax" h T; // ERROR "syntax|signature"
} }
...@@ -8,5 +8,5 @@ package main ...@@ -8,5 +8,5 @@ package main
func main() { func main() {
const a uint64 = 10; const a uint64 = 10;
var b int64 = a; // ERROR "convert|cannot" var b int64 = a; // ERROR "convert|cannot|incompatible"
} }
...@@ -11,5 +11,5 @@ type I interface { ...@@ -11,5 +11,5 @@ type I interface {
} }
type S struct { type S struct {
m map[S] bool; // ERROR "map key type" m map[S] bool; // ERROR "map key type|complete"
} }
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
package main package main
func f() int { } // ERROR "return" func f() int { } // ERROR "return|control"
func g() (foo int) { } // ERROR "return" func g() (foo int) { } // ERROR "return|control"
...@@ -8,5 +8,5 @@ package main ...@@ -8,5 +8,5 @@ package main
func f() { func f() {
a := true; a := true;
a |= a; // ERROR "illegal.*OR|bool" a |= a; // ERROR "illegal.*OR|bool|expected"
} }
...@@ -8,6 +8,6 @@ package main ...@@ -8,6 +8,6 @@ package main
func main() { func main() {
x := 0; x := 0;
if x { // ERROR "x.*int" if x { // ERROR "x.*int|bool"
} }
} }
...@@ -11,7 +11,7 @@ type T int ...@@ -11,7 +11,7 @@ type T int
func f() { func f() {
var x struct { T }; var x struct { T };
var y struct { T T }; var y struct { T T };
x = y // ERROR "cannot" x = y // ERROR "cannot|incompatible"
} }
type T1 struct { T } type T1 struct { T }
...@@ -20,6 +20,6 @@ type T2 struct { T T } ...@@ -20,6 +20,6 @@ type T2 struct { T T }
func g() { func g() {
var x T1; var x T1;
var y T2; var y T2;
x = y // ERROR "cannot" x = y // ERROR "cannot|incompatible"
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment