aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-05-16 08:53:24 +0300
committerseyko <seyko2@gmail.com>2016-05-16 08:53:24 +0300
commit3f233ab12763bea12421eee1a22700dee733784b (patch)
treeaba07f324bfdec7f21273979070e86eb39987494 /tccasm.c
parentf2a4cb0a0edc95ae74816275e82b4ade71c6f37a (diff)
downloadtinycc-3f233ab12763bea12421eee1a22700dee733784b.tar.gz
tinycc-3f233ab12763bea12421eee1a22700dee733784b.tar.bz2
fix asm_expr_unary()
keep unary unsigned. problem is exposed on i386 with unary like 0xC0000000. In this case a sign is extended in pe->v = n; if n declared as long.
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccasm.c b/tccasm.c
index b494398..9dcab1c 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -42,7 +42,7 @@ static void asm_expr_unary(TCCState *s1, ExprValue *pe)
{
Sym *sym;
int op, label;
- long n;
+ unsigned long n;
const char *p;
switch(tok) {