lex: 64-bit bug

R=rsc
http://codereview.appspot.com/4830054
This commit is contained in:
Russ Cox 2011-08-02 14:16:30 -04:00
parent da7e3a5d39
commit de1755b58d
3 changed files with 3 additions and 3 deletions

View file

@ -156,7 +156,7 @@ extern void mkmatch(void);
extern int mnp(int, void*);
extern int mn0(int);
extern int mn1(int, int);
extern int mn2(int, int, int);
extern int mn2(int, int, uintptr);
extern void munputc(int);
extern void munputs(uchar *);
extern void *myalloc(int, int);

View file

@ -196,7 +196,7 @@ r: CHAR
}
}
| SCON r
={ $$.i = mn2(RSCON,$2.i,$1.i); }
={ $$.i = mn2(RSCON,$2.i,(uintptr)$1.cp); }
| '^' r
={ $$.i = mn1(CARAT,$2.i); }
| r '$'

View file

@ -295,7 +295,7 @@ gch(void){
}
int
mn2(int a, int d, int c)
mn2(int a, int d, uintptr c)
{
name[tptr] = a;
left[tptr] = d;