You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Go spec (section "Goto statements") says "Executing the "goto" statement must not cause any variables to come into scope that were not already in scope at the point of the goto."
gccgo erroneously rejects this code:
package p
func f() {
goto out
type x int
out:
}
with
/tmp/goto.go:4:2: error: goto jumps over declaration of 'x'
goto out
^
/tmp/goto.go:5:7: note: 'x' defined here
type x int
^
We should only issue an error for a goto over a var declaration.
The test case for this is already in the master repository, at
test/fixedbugs/issue8042.go. It just hasn't been copied into the
gccgo repository yet.
Fixesgolang/go#19089
Reviewed-on: https://go-review.googlesource.com/91696
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257375 138bc75d-0d04-0410-961f-82ee72b054a4
We should only issue an error for a goto over a var declaration.
The test case for this is already in the master repository, at
test/fixedbugs/issue8042.go. It just hasn't been copied into the
gccgo repository yet.
Fixesgolang/go#19089
Reviewed-on: https://go-review.googlesource.com/91696
From-SVN: r257375
The Go spec (section "Goto statements") says "Executing the "goto" statement must not cause any variables to come into scope that were not already in scope at the point of the goto."
gccgo erroneously rejects this code:
with
See also #19088.
The text was updated successfully, but these errors were encountered: