summaryrefslogtreecommitdiff
path: root/src/cmd/gc/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/lex.c')
-rw-r--r--src/cmd/gc/lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gc/lex.c b/src/cmd/gc/lex.c
index e6db4e7a7..8afc737f3 100644
--- a/src/cmd/gc/lex.c
+++ b/src/cmd/gc/lex.c
@@ -1610,7 +1610,7 @@ mkpackage(char* pkgname)
// errors if a conflicting top-level name is
// introduced by a different file.
if(!s->def->used && !nsyntaxerrors)
- yyerrorl(s->def->lineno, "imported and not used: %s", s->def->sym->name);
+ yyerrorl(s->def->lineno, "imported and not used: %Z", s->def->pkg->path);
s->def = N;
continue;
}
@@ -1618,7 +1618,7 @@ mkpackage(char* pkgname)
// throw away top-level name left over
// from previous import . "x"
if(s->def->pack != N && !s->def->pack->used && !nsyntaxerrors) {
- yyerrorl(s->def->pack->lineno, "imported and not used: %s", s->def->pack->sym->name);
+ yyerrorl(s->def->pack->lineno, "imported and not used: %Z", s->def->pack->pkg->path);
s->def->pack->used = 1;
}
s->def = N;