aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/hoc
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-20 20:30:55 +0000
committerrsc <devnull@localhost>2006-04-20 20:30:55 +0000
commitde9b8f86741adea9b91a32d01fbca12069c56586 (patch)
treead8086c1775b70f2bee12ebff4aa3f94228d80f1 /src/cmd/hoc
parent3ca675a579e5dc06a10c199aa7b9d78eefa69642 (diff)
downloadplan9port-de9b8f86741adea9b91a32d01fbca12069c56586.tar.gz
plan9port-de9b8f86741adea9b91a32d01fbca12069c56586.tar.bz2
plan9port-de9b8f86741adea9b91a32d01fbca12069c56586.zip
shut up, gcc!
Diffstat (limited to 'src/cmd/hoc')
-rw-r--r--src/cmd/hoc/code.c2
-rw-r--r--src/cmd/hoc/hoc.y4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/hoc/code.c b/src/cmd/hoc/code.c
index 7ed3ed1e..1b9c3512 100644
--- a/src/cmd/hoc/code.c
+++ b/src/cmd/hoc/code.c
@@ -170,7 +170,7 @@ call(void) /* call a function */
execerror(sp->name, "call nested too deeply");
fp++;
fp->sp = sp;
- fp->nargs = (int)pc[1];
+ fp->nargs = (int)(uintptr)pc[1];
fp->retpc = pc + 2;
fp->argn = stackp - 1; /* last argument */
if(fp->nargs != sp->u.defn->nargs)
diff --git a/src/cmd/hoc/hoc.y b/src/cmd/hoc/hoc.y
index 4d353737..9c5a02f1 100644
--- a/src/cmd/hoc/hoc.y
+++ b/src/cmd/hoc/hoc.y
@@ -49,7 +49,7 @@ stmt: expr { code(xpop); }
| RETURN expr
{ defnonly("return"); $$=$2; code(funcret); }
| PROCEDURE begin '(' arglist ')'
- { $$ = $2; code3(call, (Inst)$1, (Inst)$4); }
+ { $$ = $2; code3(call, (Inst)$1, (Inst)(uintptr)$4); }
| PRINT prlist { $$ = $2; }
| while '(' cond ')' stmt end {
($1)[1] = (Inst)$5; /* body of loop */
@@ -88,7 +88,7 @@ expr: NUMBER { $$ = code2(constpush, (Inst)$1); }
| VAR { $$ = code3(varpush, (Inst)$1, eval); }
| asgn
| FUNCTION begin '(' arglist ')'
- { $$ = $2; code3(call,(Inst)$1,(Inst)$4); }
+ { $$ = $2; code3(call,(Inst)$1,(Inst)(uintptr)$4); }
| READ '(' VAR ')' { $$ = code2(varread, (Inst)$3); }
| BLTIN '(' expr ')' { $$=$3; code2(bltin, (Inst)$1->u.ptr); }
| '(' expr ')' { $$ = $2; }