gccgo: spurious expected newline error (original) (raw)

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)