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.
Unified · Split
| @@ -42,7 +42,7 @@ static void asm_expr_unary(TCCState *s1, ExprValue *pe) · 41 unmodified lines | |||
| 42 | { | 42 | { |
| 43 | Sym *sym; | 43 | Sym *sym; |
| 44 | int op, label; | 44 | int op, label; |
| 45 | long n; | 45 | unsigned long n; |
| 46 | const char *p; | 46 | const char *p; |
| 47 | 47 | ||
| 48 | switch(tok) { | 48 | switch(tok) { |