shithub: scc

Download patch

ref: 7f6a1dd82feb61cf9d3ba11710ce1ea9ad13a397
parent: e93961332a0e356c117c0ba2b4e806290d5fbc34
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Apr 16 18:07:15 EDT 2014

Remove isarith()

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

--- a/cc.h
+++ b/cc.h
@@ -123,7 +123,6 @@
 #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)
--- a/expr.c
+++ b/expr.c
@@ -466,7 +466,7 @@
 			break;
 		case '-':
 			op = ONEG;
-			if (!isarith(t))
+			if (t != INT && t != FLOAT)
 				goto bad_operand;
 		}
 		return unarycode(op, tp, np);