golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gccgo: knowns unknown escape sequence

dvyukov opened this issue · comments

gccgo successfully compiles the following program:

package a
var e = "\X00"

While gc and go/types say:

go.go:2: unknown escape sequence: X
go.go:2:11: unknown escape sequence

The spec allows only lower-case x for hex-encoded chars.

gcc version 6.0.0 2015070 (experimental) (GCC)

CL https://golang.org/cl/12158 mentions this issue.