diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-25 22:15:57 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-28 01:09:41 +0100 |
| commit | 39e46662c2f69c2f9eeeacbebe59cf1e2228f502 (patch) | |
| tree | 7ce598bba93bcb5f082e3c3363146589a5c91a89 /parse.c | |
| parent | b7dd40f5f8ea20178e20151da2aed8f1787ac3f3 (diff) | |
| download | sparse-dev-39e46662c2f69c2f9eeeacbebe59cf1e2228f502.tar.gz | |
spec: replace lllong_ctype by int128_ctype
Sparse knows about __int128_t, __uint128_t & __int128.
However, internally, these types are treated as a kind of 128-bit
'long long long' type. It's mainly a question of variable naming,
but these types are also displayed by show_typename() as
'long long long' which can't be parsed back, neither by GCC,
nor even by sparse itself.
So, rename the variables to use 'int128' and let show_typename()
display these types as '[signed|unsigned] __int128'.
Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -493,8 +493,8 @@ static struct init_keyword { /* Predeclared types */ { "__builtin_va_list", NS_TYPEDEF, .type = &ptr_ctype, .op = &spec_op }, { "__builtin_ms_va_list", NS_TYPEDEF, .type = &ptr_ctype, .op = &spec_op }, - { "__int128_t", NS_TYPEDEF, .type = &lllong_ctype, .op = &spec_op }, - { "__uint128_t",NS_TYPEDEF, .type = &ulllong_ctype, .op = &spec_op }, + { "__int128_t", NS_TYPEDEF, .type = &sint128_ctype, .op = &spec_op }, + { "__uint128_t",NS_TYPEDEF, .type = &uint128_ctype, .op = &spec_op }, { "_Float32", NS_TYPEDEF, .type = &float32_ctype, .op = &spec_op }, { "_Float32x", NS_TYPEDEF, .type = &float32x_ctype, .op = &spec_op }, { "_Float64", NS_TYPEDEF, .type = &float64_ctype, .op = &spec_op }, @@ -1229,8 +1229,8 @@ static struct symbol *to_TI_mode(struct symbol *ctype) { if (ctype->ctype.base_type != &int_type) return NULL; - return ctype->ctype.modifiers & MOD_UNSIGNED ? &ulllong_ctype - : &slllong_ctype; + return ctype->ctype.modifiers & MOD_UNSIGNED ? &uint128_ctype + : &sint128_ctype; } static struct symbol *to_pointer_mode(struct symbol *ctype) @@ -1569,13 +1569,13 @@ Catch_all: } static struct symbol * const int_types[] = - {&char_ctype, &short_ctype, &int_ctype, &long_ctype, &llong_ctype, &lllong_ctype}; + {&char_ctype, &short_ctype, &int_ctype, &long_ctype, &llong_ctype, &int128_ctype}; static struct symbol * const signed_types[] = {&schar_ctype, &sshort_ctype, &sint_ctype, &slong_ctype, &sllong_ctype, - &slllong_ctype}; + &sint128_ctype}; static struct symbol * const unsigned_types[] = {&uchar_ctype, &ushort_ctype, &uint_ctype, &ulong_ctype, &ullong_ctype, - &ulllong_ctype}; + &uint128_ctype}; static struct symbol * const real_types[] = {&float_ctype, &double_ctype, &ldouble_ctype}; static struct symbol * const * const types[] = { |
