simplify VT_LONG parsing

master
Matthias Gatto 2017-07-25 17:55:58 +02:00
parent 8258abeb80
commit a4cd2805f9
1 changed files with 3 additions and 3 deletions

View File

@ -3954,7 +3954,7 @@ static int parse_btype(CType *type, AttributeDef *ad)
basic_type: basic_type:
next(); next();
basic_type1: basic_type1:
if (u == VT_SHORT || u == VT_LONG) { if (u == VT_SHORT) {
if (st != -1 || (bt != -1 && bt != VT_INT)) if (st != -1 || (bt != -1 && bt != VT_INT))
tmbt: tcc_error("too many basic types"); tmbt: tcc_error("too many basic types");
st = u; st = u;
@ -3984,8 +3984,8 @@ static int parse_btype(CType *type, AttributeDef *ad)
} else if (t & VT_LONG) { } else if (t & VT_LONG) {
t = (t & ~(VT_LONG | VT_BTYPE)) | VT_LLONG; t = (t & ~(VT_LONG | VT_BTYPE)) | VT_LLONG;
} else { } else {
u = VT_LONG; t |= VT_LONG;
goto basic_type; typespec_found = 1;
} }
next(); next();
break; break;