diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-11 00:29:27 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-11 13:53:46 +0100 |
commit | c04f113be723564844ec7132f3d1b4155e0fa7c6 (patch) | |
tree | 2bc44f52326fe41c6bb8f061ffcadcd36e9631ab | |
parent | 4c3567c2a7bf578995f598455b3219016aca3b82 (diff) | |
download | sparse-c04f113be723564844ec7132f3d1b4155e0fa7c6.tar.gz |
spec: improve parsing of __int128
__int128 is processed as-if 'long' is applied to a
'long long'-like type. But this is not necessary or
desirable: better to be more direct and process it
as a kind of 'long long long' type.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -300,9 +300,9 @@ static struct symbol_op long_op = { }; static struct symbol_op int128_op = { - .type = KW_SPECIFIER | KW_LONG, + .type = KW_SPECIFIER, .test = Set_S|Set_T|Set_Char|Set_Short|Set_Int|Set_Float|Set_Double|Set_Long|Set_Vlong|Set_Int128, - .set = Set_T|Set_Int128, + .set = Set_T|Set_Int128|Set_Vlong, .class = CInt, }; @@ -1624,12 +1624,12 @@ static struct token *declaration_specifiers(struct token *token, struct decl_sta } seen |= s->op->set; class += s->op->class; - if (s->op->set & Set_Int128) - size = 2; if (s->op->type & KW_SHORT) { size = -1; } else if (s->op->set & Set_Char) { size = -2; + } else if (s->op->set & Set_Int128) { + size = 3; } else if (s->op->type & KW_LONG && size++) { if (class == CReal) { specifier_conflict(token->pos, |