]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: print regular error message in BOM corner-case
authorRobert Griesemer <gri@golang.org>
Thu, 19 Nov 2015 01:50:21 +0000 (17:50 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 20 Nov 2015 19:55:15 +0000 (19:55 +0000)
commit52f111fb34a4f57404db53af4d89d4a25fcb114e
tree868edb711189de5d9e1b2360ac58d14fd8f86971
parent85dcc34e0dad613f7f7d0915a52bdacedd570c3a
cmd/compile: print regular error message in BOM corner-case

This never happens but for pathological input where a BOM sequence
is unfinished and ends in EOF (src: "package p\n\nfunc \xef\xef").
No test case added because the /test framework doesn't lend itself
easily to it in this case (file must end in EOF rather than comment).
Instead, tested manually.

Fixes #13268.

Change-Id: I049034e6dde7ad884b0a8c329921adac1866ff18
Reviewed-on: https://go-review.googlesource.com/17047
Reviewed-by: Chris Manghane <cmang@golang.org>
src/cmd/compile/internal/gc/lex.go