You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Floating-point constants with binary ('p') exponents are not permitted in the source and that has been fixed (issue #9036). E.g.:
package p
const _ = 1p10
is not accepted anymore:
x.go:2: malformed floating point constant
However, it appears that the numbers are still recognized (and not set to 0 or 1) and then make it through the rest of type-checking/constant evaluation:
package p
const _ = 1 << 1p10
x.go:2: malformed floating point constant
x.go:2: stupid shift: 1024
The fact that we hang in Karatsuba is known and is effectively (indirectly) a duplicate of #11327. But once we set 'p' exponent values to 0, the hang should disappear.
$ cat > bug11364.go
package a
var e = 1<<1p10000000<<3
$ go tool compilebug11364.go
go tool compile bug11364.go
bug11364.go:2: syntax error: unexpected p10000000 after top level declaration
go tool compile
hangs in karatsuba compiling the following program:Can we just break off hex exponents (p)? They are not supported by go/types-based frontends and so are non-portable.
go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
The text was updated successfully, but these errors were encountered: