scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 7f6a1dd82feb61cf9d3ba11710ce1ea9ad13a397
parent e93961332a0e356c117c0ba2b4e806290d5fbc34
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 16 Apr 2014 22:07:15 +0200

Remove isarith()

This macro was used once and it can be replaced
by INT || FLOAT

Diffstat:
Mcc.h | 1-
Mexpr.c | 2+-
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/cc.h b/cc.h @@ -123,7 +123,6 @@ extern Type *voidtype, *pvoidtype, *booltype, #define ISQUAL(t) (isqual((t)->op)) #define UNQUAL(t) (ISQUAL(t) ? (t)->type : (t)) #define BTYPE(t) (UNQUAL(t)->op) -#define isarith(op) ((op) & ARITH) #define isaddr(op) ((op) & POINTER) #define isrecord(op) ((op) & RECORD) #define isqual(op) ((op) & TQUALIFIER) diff --git a/expr.c b/expr.c @@ -466,7 +466,7 @@ unary(void) break; case '-': op = ONEG; - if (!isarith(t)) + if (t != INT && t != FLOAT) goto bad_operand; } return unarycode(op, tp, np);