aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cc.h6
-rw-r--r--decl.c30
-rw-r--r--expr.c2
-rw-r--r--type.c24
4 files changed, 31 insertions, 31 deletions
diff --git a/cc.h b/cc.h
index 0de4d2b..c2ee78f 100644
--- a/cc.h
+++ b/cc.h
@@ -198,10 +198,10 @@ struct type {
BASICINT,
BASICENUM,
BASICLONG,
- BASICLONGLONG,
+ BASICLLONG,
BASICFLOAT,
BASICDOUBLE,
- BASICLONGDOUBLE,
+ BASICLDOUBLE,
} kind;
_Bool issigned, iscomplex;
} basic;
@@ -416,7 +416,7 @@ extern struct type typeshort, typeushort;
extern struct type typeint, typeuint;
extern struct type typelong, typeulong;
extern struct type typellong, typeullong;
-extern struct type typefloat, typedouble, typelongdouble;
+extern struct type typefloat, typedouble, typeldouble;
extern struct type typevalist, typevalistptr;
/* decl */
diff --git a/decl.c b/decl.c
index 80d1c0a..95373da 100644
--- a/decl.c
+++ b/decl.c
@@ -380,36 +380,36 @@ declspecs(struct scope *s, enum storageclass *sc, enum funcspec *fs, int *align)
}
done:
switch ((int)ts) {
- case SPECNONE: break;
- case SPECCHAR: t = &typechar; break;
- case SPECSIGNED|SPECCHAR: t = &typeschar; break;
- case SPECUNSIGNED|SPECCHAR: t = &typeuchar; break;
+ case SPECNONE: break;
+ case SPECCHAR: t = &typechar; break;
+ case SPECSIGNED|SPECCHAR: t = &typeschar; break;
+ case SPECUNSIGNED|SPECCHAR: t = &typeuchar; break;
case SPECSHORT:
case SPECSHORT|SPECINT:
case SPECSIGNED|SPECSHORT:
- case SPECSIGNED|SPECSHORT|SPECINT: t = &typeshort; break;
+ case SPECSIGNED|SPECSHORT|SPECINT: t = &typeshort; break;
case SPECUNSIGNED|SPECSHORT:
- case SPECUNSIGNED|SPECSHORT|SPECINT: t = &typeushort; break;
+ case SPECUNSIGNED|SPECSHORT|SPECINT: t = &typeushort; break;
case SPECINT:
case SPECSIGNED:
- case SPECSIGNED|SPECINT: t = &typeint; break;
+ case SPECSIGNED|SPECINT: t = &typeint; break;
case SPECUNSIGNED:
- case SPECUNSIGNED|SPECINT: t = &typeuint; break;
+ case SPECUNSIGNED|SPECINT: t = &typeuint; break;
case SPECLONG:
case SPECLONG|SPECINT:
case SPECSIGNED|SPECLONG:
- case SPECSIGNED|SPECLONG|SPECINT: t = &typelong; break;
+ case SPECSIGNED|SPECLONG|SPECINT: t = &typelong; break;
case SPECUNSIGNED|SPECLONG:
- case SPECUNSIGNED|SPECLONG|SPECINT: t = &typeulong; break;
+ case SPECUNSIGNED|SPECLONG|SPECINT: t = &typeulong; break;
case SPECLONGLONG:
case SPECLONGLONG|SPECINT:
case SPECSIGNED|SPECLONGLONG:
- case SPECSIGNED|SPECLONGLONG|SPECINT: t = &typellong; break;
+ case SPECSIGNED|SPECLONGLONG|SPECINT: t = &typellong; break;
case SPECUNSIGNED|SPECLONGLONG:
- case SPECUNSIGNED|SPECLONGLONG|SPECINT: t = &typeullong; break;
- case SPECFLOAT: t = &typefloat; break;
- case SPECDOUBLE: t = &typedouble; break;
- case SPECLONG|SPECDOUBLE: t = &typelongdouble; break;
+ case SPECUNSIGNED|SPECLONGLONG|SPECINT: t = &typeullong; break;
+ case SPECFLOAT: t = &typefloat; break;
+ case SPECDOUBLE: t = &typedouble; break;
+ case SPECLONG|SPECDOUBLE: t = &typeldouble; break;
default:
error(&tok.loc, "invalid combination of type specifiers");
}
diff --git a/expr.c b/expr.c
index 1ed040c..657e211 100644
--- a/expr.c
+++ b/expr.c
@@ -371,7 +371,7 @@ primaryexpr(struct scope *s)
else if (tolower(end[0]) == 'f' && !end[1])
e->type = &typefloat;
else if (tolower(end[0]) == 'l' && !end[1])
- e->type = &typelongdouble;
+ e->type = &typeldouble;
else
error(&tok.loc, "invalid floating constant suffix '%s'", *end);
} else {
diff --git a/type.c b/type.c
index e458c19..0a4aa45 100644
--- a/type.c
+++ b/type.c
@@ -21,13 +21,13 @@ struct type typeuint = {.kind = TYPEBASIC, .size = 4, .align = 4, .repr =
struct type typelong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLONG, .issigned = 1}};
struct type typeulong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLONG}};
-struct type typellong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLONGLONG, .issigned = 1}};
-struct type typeullong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLONGLONG}};
+struct type typellong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLLONG, .issigned = 1}};
+struct type typeullong = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &i64, .basic = {.kind = BASICLLONG}};
struct type typebool = {.kind = TYPEBASIC, .size = 1, .align = 1, .repr = &i8, .basic = {.kind = BASICBOOL}};
struct type typefloat = {.kind = TYPEBASIC, .size = 4, .align = 4, .repr = &f32, .basic = {.kind = BASICFLOAT}};
struct type typedouble = {.kind = TYPEBASIC, .size = 8, .align = 8, .repr = &f64, .basic = {.kind = BASICDOUBLE}};
-struct type typelongdouble = {.kind = TYPEBASIC, .size = 16, .align = 16, .basic = {.kind = BASICLONGDOUBLE}}; // XXX: not supported by qbe
+struct type typeldouble = {.kind = TYPEBASIC, .size = 16, .align = 16, .basic = {.kind = BASICLDOUBLE}}; // XXX: not supported by qbe
static struct type typevaliststruct = {.kind = TYPESTRUCT, .size = 24, .align = 8};
struct type typevalist = {.kind = TYPEARRAY, .size = 24, .align = 8, .array = {1}, .base = &typevaliststruct};
@@ -94,7 +94,7 @@ typeprop(struct type *t)
switch (t->basic.kind) {
case BASICFLOAT:
case BASICDOUBLE:
- case BASICLONGDOUBLE:
+ case BASICLDOUBLE:
p |= PROPFLOAT;
break;
case BASICCHAR:
@@ -132,13 +132,13 @@ typerank(struct type *t)
{
assert(typeprop(t) & PROPINT);
switch (t->basic.kind) {
- case BASICBOOL: return 1;
- case BASICCHAR: return 2;
- case BASICSHORT: return 3;
+ case BASICBOOL: return 1;
+ case BASICCHAR: return 2;
+ case BASICSHORT: return 3;
case BASICENUM:
- case BASICINT: return 4;
- case BASICLONG: return 5;
- case BASICLONGLONG: return 6;
+ case BASICINT: return 4;
+ case BASICLONG: return 5;
+ case BASICLLONG: return 6;
default:
fatal("internal error; unhandled integer type");
}
@@ -240,8 +240,8 @@ typecommonreal(struct type *t1, struct type *t2)
assert(t1->kind == TYPEBASIC && t2->kind == TYPEBASIC);
if (t1 == t2)
return t1;
- if (t1 == &typelongdouble || t2 == &typelongdouble)
- return &typelongdouble;
+ if (t1 == &typeldouble || t2 == &typeldouble)
+ return &typeldouble;
if (t1 == &typedouble || t2 == &typedouble)
return &typedouble;
if (t1 == &typefloat || t2 == &typefloat)