diff options
author | Russ Cox <rsc@swtch.com> | 2011-08-02 14:16:30 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2011-08-02 14:16:30 -0400 |
commit | de1755b58dd9a4a7523d5303799e43db44c25cec (patch) | |
tree | 117717352596711784bc736453509b3a4bb64832 /src/cmd/lex | |
parent | da7e3a5d39b3acf930ca5714aed4826435cb1e13 (diff) | |
download | plan9port-de1755b58dd9a4a7523d5303799e43db44c25cec.tar.gz plan9port-de1755b58dd9a4a7523d5303799e43db44c25cec.tar.bz2 plan9port-de1755b58dd9a4a7523d5303799e43db44c25cec.zip |
lex: 64-bit bug
R=rsc
http://codereview.appspot.com/4830054
Diffstat (limited to 'src/cmd/lex')
-rw-r--r-- | src/cmd/lex/ldefs.h | 2 | ||||
-rw-r--r-- | src/cmd/lex/parser.y | 2 | ||||
-rw-r--r-- | src/cmd/lex/sub1.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/lex/ldefs.h b/src/cmd/lex/ldefs.h index f6d7ff6b..d9b03fde 100644 --- a/src/cmd/lex/ldefs.h +++ b/src/cmd/lex/ldefs.h @@ -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); diff --git a/src/cmd/lex/parser.y b/src/cmd/lex/parser.y index 2d57e3f3..964a60fe 100644 --- a/src/cmd/lex/parser.y +++ b/src/cmd/lex/parser.y @@ -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 '$' diff --git a/src/cmd/lex/sub1.c b/src/cmd/lex/sub1.c index 3996d219..dcbbb581 100644 --- a/src/cmd/lex/sub1.c +++ b/src/cmd/lex/sub1.c @@ -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; |