golang/go

gccgo: can apply ^ to true

dvyukov opened this issue · 2 comments

gccgo accepts the following program:

package a
var f = ^true

While gc and go/types say:

go.go:2:10: invalid operation: operator ^ not defined for true (untyped bool constant)
go.go:2: invalid operation: ^ untyped bool

gcc version 6.0.0 2015070 (experimental) (GCC)

CL https://golang.org/cl/13790 mentions this issue.