Skip to content

gccgo: can shift by string #12936

Closed
Closed
@dvyukov

Description

@dvyukov

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions