gccgo: spurious expected newline error
dvyukov opened this issue · comments
gcc rejects the following program:
package e
const(G=0/*
*/V)
go.go:3:3: error: expected ‘;’ or ‘)’ or newline
The spec says:
General comments start with the character sequence /* and continue through the character sequence */. A general comment containing one or more newlines acts like a newline, otherwise it acts like a space.
Both gc and go/types accept this program.
gcc version 6.0.0 2015070 (experimental) (GCC)
CL https://golang.org/cl/13064 mentions this issue.