diff options
| author | matthias <uso.cosmo.ray@gmail.com> | 2017-07-25 22:04:24 +0200 |
|---|---|---|
| committer | matthias <uso.cosmo.ray@gmail.com> | 2017-07-25 22:04:24 +0200 |
| commit | c18fc950d721f5f734116cebba729fc8f7759964 (patch) | |
| tree | 2d8952821b3f17a29546f92dfca19537ac240626 | |
| parent | 023d4e0b598032441918679cf147b6c7b7611efe (diff) | |
| download | tinycc-c18fc950d721f5f734116cebba729fc8f7759964.tar.gz tinycc-c18fc950d721f5f734116cebba729fc8f7759964.tar.bz2 | |
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 a4cd2805f95e1369254762478883e91050f2cba1.
| -rw-r--r-- | tccgen.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3954,7 +3954,7 @@ static int parse_btype(CType *type, AttributeDef *ad) basic_type: next(); basic_type1: - if (u == VT_SHORT) { + if (u == VT_SHORT || u == VT_LONG) { 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 { - t |= VT_LONG; - typespec_found = 1; + u = VT_LONG; + goto basic_type; } next(); break; |
