> "" (shift count ty...">

gccgo: can shift by string (original) (raw)

gccgo successfully compiles the following program:

package e const c = 0>>""

while gc says:

/tmp/test.go:2: cannot convert "" to type uint
/tmp/test.go:2: invalid operation: 0 >> "" (shift count type string, must be unsigned integer)

gc seems to be right.
gcc on rev 228818, gofrontend on a4bcd319d98ddc52b3e7d16ec87d92aad868ab05