aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorMatthias Gatto <uso.cosmo.ray@gmail.com>2017-07-25 17:55:58 +0200
committerMatthias Gatto <uso.cosmo.ray@gmail.com>2017-07-25 18:56:41 +0200
commita4cd2805f95e1369254762478883e91050f2cba1 (patch)
tree551f5c3cb3cd347595fb906b614ba1e6f8a10662 /tccgen.c
parent8258abeb80ce202f388c9ddb6e46f6d7d34678ea (diff)
downloadtinycc-a4cd2805f95e1369254762478883e91050f2cba1.tar.gz
tinycc-a4cd2805f95e1369254762478883e91050f2cba1.tar.bz2
simplify VT_LONG parsing
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tccgen.c b/tccgen.c
index 3da1143..292c091 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3954,7 +3954,7 @@ static int parse_btype(CType *type, AttributeDef *ad)
basic_type:
next();
basic_type1:
- if (u == VT_SHORT || u == VT_LONG) {
+ if (u == VT_SHORT) {
if (st != -1 || (bt != -1 && bt != VT_INT))
tmbt: tcc_error("too many basic types");
st = u;
@@ -3984,8 +3984,8 @@ static int parse_btype(CType *type, AttributeDef *ad)
} else if (t & VT_LONG) {
t = (t & ~(VT_LONG | VT_BTYPE)) | VT_LLONG;
} else {
- u = VT_LONG;
- goto basic_type;
+ t |= VT_LONG;
+ typespec_found = 1;
}
next();
break;