Skip to content

gccgo: can do bitwise or on fp constants #11566

Closed
@dvyukov

Description

@dvyukov

gccgo successfully compiles the following program:

package a
const d rune = 1e2|2

gc and go/types reject this program saying:

illegal constant expression: untyped number | untyped number
invalid operation: operator | not defined for 1e2 (untyped float constant 100)

gcc version 6.0.0 2015070 (experimental) (GCC)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions