summaryrefslogtreecommitdiff
path: root/usr/src/cmd/awk/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/awk/parse.c')
-rw-r--r--usr/src/cmd/awk/parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/src/cmd/awk/parse.c b/usr/src/cmd/awk/parse.c
index c91550f310..2afcf1e78f 100644
--- a/usr/src/cmd/awk/parse.c
+++ b/usr/src/cmd/awk/parse.c
@@ -221,7 +221,8 @@ celltonode(Cell *a, int b)
Node *
rectonode(void) /* make $0 into a Node */
{
- return (celltonode(recloc, CFLD));
+ extern Cell *literal0;
+ return (op1(INDIRECT, celltonode(literal0, CUNK)));
}
Node *
@@ -285,6 +286,10 @@ defn(Cell *v, Node *vl, Node *st)
SYNTAX("`%s' is an array name and a function name", v->nval);
return;
}
+ if (isarg(v->nval) != -1) {
+ SYNTAX("`%s' is both function name and argument name", v->nval);
+ return;
+ }
v->tval = FCN;
v->sval = (char *)st;