From 5f6655b3aa0765599347bf353cb9aba3578f7ca5 Mon Sep 17 00:00:00 2001 From: Ken Thompson Date: Sat, 5 Jul 2008 17:43:25 -0700 Subject: random little bugs SVN=126049 --- src/cmd/gc/export.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/cmd/gc/export.c') diff --git a/src/cmd/gc/export.c b/src/cmd/gc/export.c index 3d81b6bb9..2ec84908e 100644 --- a/src/cmd/gc/export.c +++ b/src/cmd/gc/export.c @@ -117,8 +117,10 @@ dumpexportvar(Sym *s) s->exported = 1; n = s->oname; - if(n == N || n->type == T) - fatal("dumpexportvar: oname nil: %S\n", s); + if(n == N || n->type == T) { + yyerror("variable exported but not defined: %S\n", s); + return; + } t = n->type; reexport(t); @@ -141,8 +143,11 @@ dumpexporttype(Sym *s) s->exported = 1; t = s->otype; - if(t == T) - fatal("dumpexporttype: otype nil: %S\n", s); + if(t == T) { + yyerror("type exported but not defined: %S\n", s); + return; + } + if(t->sym != s) fatal("dumpexporttype: cross reference: %S\n", s); -- cgit v1.2.3