commit 028d61128a684788eba34d269484367c0e4b6973
parent a2e43bb731e42e513878f7ae93255ae329ebbf0c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 11 Aug 2014 23:45:21 +0200
Remove OARY operator
This operator is the same than OPTR, so it is not necessary.
Diffstat:
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cc1/cc1.h b/cc1/cc1.h
@@ -172,7 +172,7 @@ typedef struct node {
} Node;
enum {
- OCAST = 1, OPTR, OADD, OARY, OSIZE, OMUL, OSUB,
+ OCAST = 1, OPTR, OADD, OSIZE, OMUL, OSUB,
OINC, ODEC, ODIV, OMOD, OSHL, OSHR,
OBAND, OBXOR, OBOR, OASSIGN, OA_MUL, OA_DIV,
OA_MOD, OA_ADD, OA_SUB, OA_SHL, OA_SHR,
diff --git a/cc1/code.c b/cc1/code.c
@@ -14,7 +14,6 @@ char *opcodes[] = {
[OADD] = "+",
[OSUB] = "-",
[OMUL] = "*",
- [OARY] = "'",
[OINC] = ";+",
[ODEC] = ";-",
[OSIZE] = "#",
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -321,7 +321,7 @@ array(Node *np1, Node *np2)
tp = np1->type;
if (tp->op != PTR)
error("subscripted value is neither array nor pointer nor vector");
- np1 = unarycode(OARY, tp->type , np1);
+ np1 = unarycode(OPTR, tp->type , np1);
np1->b.lvalue = 1;
return np1;
}