Skip to content

gccgo: spurious expected newline error #11528

Closed
@dvyukov

Description

@dvyukov

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions