Closed
Description
gccgo rejects to compile the following program:
package a
var a = string(0xE000000000000000)
go.go:2:16: error: integer constant overflow
The spec says:
A constant value x can be converted to type T in any of these cases:
...
x is an integer constant and T is a string type. The same rule as for non-constant x applies in this case.
...
Converting a signed or unsigned integer value to a string type yields a string containing the UTF-8 representation of the integer. Values outside the range of valid Unicode code points are converted to "\uFFFD".
gcc version 6.0.0 2015070 (experimental) (GCC)