]> Cypherpunks repositories - gostls13.git/commitdiff
Recognize gccgo error messages.
authorIan Lance Taylor <iant@golang.org>
Thu, 13 Aug 2009 16:42:28 +0000 (09:42 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 13 Aug 2009 16:42:28 +0000 (09:42 -0700)
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

12 files changed:
test/fixedbugs/bug039.go
test/fixedbugs/bug049.go
test/fixedbugs/bug062.go
test/fixedbugs/bug086.go
test/fixedbugs/bug103.go
test/fixedbugs/bug121.go
test/fixedbugs/bug131.go
test/fixedbugs/bug165.go
test/fixedbugs/bug171.go
test/fixedbugs/bug172.go
test/fixedbugs/bug182.go
test/fixedbugs/bug183.go

index 712e843326a05234723a1c46db039eea21359208..591b7fe7db7e9c6b48d4710f26875ad641a428ca 100644 (file)
@@ -6,6 +6,6 @@
 
 package main
 
-func main (x int) {
-  var x int;  // ERROR "redecl"
+func main (x int) {    // GCCGO_ERROR "previous"
+  var x int;  // ERROR "redecl|redefinition"
 }
index 13527e872276b044c5646705af1cc695e21ef7a2..8fd67ccd51b03689813321ce3afa9b87469e8fc1 100644 (file)
@@ -7,7 +7,7 @@
 package main
 
 func atom(s string) {
-       if s == nil {   // ERROR "nil"
+       if s == nil {   // ERROR "nil|incompatible"
                return;
        }
 }
index 4346c5a5f9ef61c77201a1063d731eb6a519be38..c869eb22242e439068791023abc769d2ad348869 100644 (file)
@@ -7,5 +7,5 @@
 package main
 
 func main() {
-  var s string = nil;  // ERROR "illegal|invalid|cannot"
+  var s string = nil;  // ERROR "illegal|invalid|incompatible|cannot"
 }
index 7d85063f1bd1fd6438ace6b5fe55891c8afc1c68..f96472fbb35728efd2e83ecacefee04ca239f3dd 100644 (file)
@@ -6,7 +6,7 @@
 
 package main
 
-func f() int { // ERROR "return"
+func f() int { // ERROR "return|control"
        if false {
                return 0;
        }
index da212121c4e8dcfc050cd170a5cc1b9fbeead6e1..b789be1c4579dafd3c20ba225c9ca66c3671f8c1 100644 (file)
@@ -9,6 +9,6 @@ package main
 func f() /* no return type */ {}
 
 func main() {
-       x := f();  // ERROR "mismatch|as value"
+       x := f();  // ERROR "mismatch|as value|no type"
 }
 
index 6473fa995a804a1b7b73a769ad95c3586b9a9744..7bd721815dda1dcd281f122d34f40d9422cf4037 100644 (file)
@@ -10,6 +10,6 @@ type T func()
 
 type I interface {
        f, g ();
-       h T;  // ERROR "syntax"
+       h T;  // ERROR "syntax|signature"
 }
 
index c2644c4a3f8d554bd6f7b3dceaa471b4ecdfc412..8205aa56f3dcb3e2a4338bc7619946726d834207 100644 (file)
@@ -8,5 +8,5 @@ package main
 
 func main() {
   const a uint64 = 10;
-  var b int64 = a;     // ERROR "convert|cannot"
+  var b int64 = a;     // ERROR "convert|cannot|incompatible"
 }
index 8ce67a46db574fa73c830f8164926a8f2c2b6054..a4fe715c2cf470eb5c9576c1a27cc3ca42195564 100644 (file)
@@ -11,5 +11,5 @@ type I interface {
 }
 
 type S struct {
-       m map[S] bool;  // ERROR "map key type"
+       m map[S] bool;  // ERROR "map key type|complete"
 }
index 03f47e99e51bdea28e3bdbe7afbc99ffd97c2e1d..5357b2adc60d387f156d789c1c080a2eeae74c3c 100644 (file)
@@ -6,5 +6,5 @@
 
 package main
 
-func f() int { }       // ERROR "return"
-func g() (foo int) { } // ERROR "return"
+func f() int { }       // ERROR "return|control"
+func g() (foo int) { } // ERROR "return|control"
index d4ce65ec62b56edd31de47a4ccb2a7ef0679ef18..1837a1158a66d1e8e6f3fc14bb5c8adb88ecedb0 100644 (file)
@@ -8,5 +8,5 @@ package main
 
 func f() {
        a := true;
-       a |= a; // ERROR "illegal.*OR|bool"
+       a |= a; // ERROR "illegal.*OR|bool|expected"
 }
index 3e3d3c4b1e65bfadca7e27f91fbfb7f1670977bf..81df2ca13c6e4aa654581a15a3a4ccf721c95762 100644 (file)
@@ -8,6 +8,6 @@ package main
 
 func main() {
        x := 0;
-       if x {  // ERROR "x.*int"
+       if x {  // ERROR "x.*int|bool"
        }
 }
index 5c3ef49341b86f4a3f902170e73c529ce60e35d4..47f8bfe746d2e0f015b56bfd810ec90fe9f4e0b0 100644 (file)
@@ -11,7 +11,7 @@ type T int
 func f() {
        var x struct { T };
        var y struct { T T };
-       x = y   // ERROR "cannot"
+       x = y   // ERROR "cannot|incompatible"
 }
 
 type T1 struct { T }
@@ -20,6 +20,6 @@ type T2 struct { T T }
 func g() {
        var x T1;
        var y T2;
-       x = y   // ERROR "cannot"
+       x = y   // ERROR "cannot|incompatible"
 }