]> Cypherpunks repositories - gostls13.git/commitdiff
test: gccgo and gc print the error on different lines.
authorIan Lance Taylor <iant@golang.org>
Tue, 31 Aug 2010 21:12:23 +0000 (14:12 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 31 Aug 2010 21:12:23 +0000 (14:12 -0700)
This introduces GC_ERROR to mark an error only issued by the
gc compiler.  GCCGO_ERROR already exists to mark errors only
issued by the gccgo compiler.  Obviously these should be used
sparingly.

bug195.go:9: error: interface contains embedded non-interface
bug195.go:12: error: interface contains embedded non-interface
bug195.go:15: error: interface contains embedded non-interface
bug195.go:18: error: invalid recursive interface
bug195.go:22: error: invalid recursive interface

R=rsc
CC=golang-dev
https://golang.org/cl/2040043

test/errchk
test/fixedbugs/bug195.go

index 115aa7be097fa51b200c8975c0090969e15838a4..ab7192da2a823f86959ad5b900bb69ee72ed64d9 100755 (executable)
@@ -60,8 +60,8 @@ sub bug() {
 $line = 0;
 foreach $src (@src) {
        $line++;
-       next unless $src =~ m|// ERROR (.*)|;
-       $regexp = $1;
+       next unless $src =~ m|// (GC_)?ERROR (.*)|;
+       $regexp = $2;
        if($regexp !~ /^"([^"]*)"/) {
                print STDERR "$file:$line: malformed regexp\n";
                next;
index 27bbbd354a62430a817b3d4fb497f6c7e6f99139..65ab02a0393311faefcec29775e1554e8d7adcd6 100644 (file)
@@ -19,9 +19,9 @@ type I4 interface {
 }
 
 type I5 interface {
-       I6
+       I6      // GCCGO_ERROR "interface"
 }
 
 type I6 interface {
-       I5      // ERROR "interface"
+       I5      // GC_ERROR "interface"
 }