ref: ff9a7ec77a798f1555fa184a1516f3f721943560
parent: b4b8c8c5ff06d158b4aaa3811bcb39ce2a7c07e8
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jul 13 02:57:39 EDT 2014
Remove qualifier() function
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -89,8 +89,7 @@
struct symbol *hash;
};
-extern Type *qualifier(Type *tp, uint8_t qlf),
- *ctype(int8_t type, int8_t sign, int8_t size),
+extern Type *ctype(int8_t type, int8_t sign, int8_t size),
*mktype(Type *tp, uint8_t op, uint16_t nelem);
extern Symbol
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -156,7 +156,7 @@
for (bp = declarator0(data, flags); bp >= data; --bp) {
switch (bp->op) {
case PTR:
- tp = qualifier(mktype(tp, PTR, 0), bp->u.qlf);
+ tp = mktype(tp, PTR, 0);
break;
case ARY:
tp = mktype(tp, ARY, bp->u.nelem);
@@ -254,7 +254,7 @@
*sclass = cls;
if (!tp)
tp = ctype(type, sign, size);
- return (qlf) ? qualifier(tp, qlf) : tp;
+ return tp;
invalid_type:
error("invalid type specification");
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -180,19 +180,3 @@
return *tbl = bp;
}
-Type *
-qualifier(Type *tp, uint8_t qlf)
-{
- uint8_t q = tp->op;
-
- if (!qlf)
- return tp;
- if (q & TQUALIFIER) {
- if (q == qlf)
- return tp;
- tp = tp->type;
- qlf |= q;
- }
- return mktype(tp, qlf|TQUALIFIER, 0);
-}
-