Commit 09977734 authored by Ian Lance Taylor's avatar Ian Lance Taylor

test: gccgo and gc print the error on different lines.

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
parent 472cd3af
...@@ -60,8 +60,8 @@ sub bug() { ...@@ -60,8 +60,8 @@ sub bug() {
$line = 0; $line = 0;
foreach $src (@src) { foreach $src (@src) {
$line++; $line++;
next unless $src =~ m|// ERROR (.*)|; next unless $src =~ m|// (GC_)?ERROR (.*)|;
$regexp = $1; $regexp = $2;
if($regexp !~ /^"([^"]*)"/) { if($regexp !~ /^"([^"]*)"/) {
print STDERR "$file:$line: malformed regexp\n"; print STDERR "$file:$line: malformed regexp\n";
next; next;
......
...@@ -19,9 +19,9 @@ type I4 interface { ...@@ -19,9 +19,9 @@ type I4 interface {
} }
type I5 interface { type I5 interface {
I6 I6 // GCCGO_ERROR "interface"
} }
type I6 interface { type I6 interface {
I5 // ERROR "interface" I5 // GC_ERROR "interface"
} }
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