Commit 605d0746 authored by Russ Cox's avatar Russ Cox

catch export on func.

print names in message.

R=ken
OCL=22891
CL=22891
parent 33f3ed77
......@@ -73,12 +73,14 @@ autoexport(Sym *s)
return;
if(exportname(s->name)) {
if(dcladj != exportsym)
warn("uppercase missing export");
warn("uppercase missing export: %S", s);
exportsym(s);
} else {
if(dcladj == exportsym)
warn("export missing uppercase");
packagesym(s);
if(dcladj == exportsym) {
warn("export missing uppercase: %S", s);
exportsym(s);
} else
packagesym(s);
}
}
......
......@@ -186,6 +186,8 @@ xdcl:
}
| xfndcl
{
if($1 != N && $1->nname != N && $1->type->thistuple == 0)
autoexport($1->nname->sym);
$$ = N;
}
| LEXPORT { dcladj = exportsym; stksize = initstksize; } common_dcl
......@@ -205,8 +207,11 @@ xdcl:
}
| LEXPORT xfndcl
{
if($2 != N && $2->nname != N)
exportsym($2->nname->sym);
if($2 != N && $2->nname != N) {
dcladj = exportsym;
autoexport($2->nname->sym);
dcladj = nil;
}
$$ = N;
}
| LPACKAGE { warn("package is gone"); } xfndcl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment