From 3f233ab12763bea12421eee1a22700dee733784b Mon Sep 17 00:00:00 2001 From: seyko Date: Mon, 16 May 2016 08:53:24 +0300 Subject: [PATCH] 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. --- tccasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {