forked from Mirrors/tinycc
Revert "simplify VT_LONG parsing"
Too simple long parsion.
Take me a long long long time to see my mistake,
Sorry
(long long long wasn't see as an error)
This reverts commit a4cd2805f9
.
master
parent
023d4e0b59
commit
c18fc950d7
6
tccgen.c
6
tccgen.c
|
@ -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) {
|
if (u == VT_SHORT || u == VT_LONG) {
|
||||||
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 {
|
||||||
t |= VT_LONG;
|
u = VT_LONG;
|
||||||
typespec_found = 1;
|
goto basic_type;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue