From 9e497c3656183595ee9054e8561b28f37ccaff8d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 20 May 2010 17:34:22 -0700 Subject: [PATCH] =?UTF-8?q?gc:=20disallow=20=C2=B7=20in=20Go=20programs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #793. R=ken2 CC=golang-dev https://golang.org/cl/1249043 --- src/cmd/gc/lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/lex.c b/src/cmd/gc/lex.c index 48c200ccea7..1bf51a70a44 100644 --- a/src/cmd/gc/lex.c +++ b/src/cmd/gc/lex.c @@ -854,7 +854,7 @@ talph: ungetc(c); rune = getr(); // 0xb7 ยท is used for internal names - if(!isalpharune(rune) && !isdigitrune(rune) && rune != 0xb7) + if(!isalpharune(rune) && !isdigitrune(rune) && (importpkg == nil || rune != 0xb7)) yyerror("invalid identifier character 0x%ux", rune); cp += runetochar(cp, &rune); } else if(!isalnum(c) && c != '_')