diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 681debb0392d76883746b0636a5c794c0ab9d757..1bada25300dbf486250ac2923f8c2b483bdc1241 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -3e8f49a2137a87fdaba51c3002ddbe41ab18ed46 +8b913a1865e36d4bd105f29aa0b12264a4e03515 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc index 156a90c7baf26d5042b902bca94bf95c7c152324..e71b8cddf652c85686dcc0cfca1acc7c926f0a80 100644 --- a/gcc/go/gofrontend/lex.cc +++ b/gcc/go/gofrontend/lex.cc @@ -743,6 +743,13 @@ Lex::next_token() if (Lex::is_unicode_letter(ci)) return this->gather_identifier(); + if (!issued_error && Lex::is_unicode_digit(ci)) + { + go_error_at(this->location(), + "identifier cannot begin with digit"); + issued_error = true; + } + if (!issued_error) go_error_at(this->location(), "invalid character 0x%x in input file",