diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-30 23:31:56 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-04 20:47:52 +0200 |
| commit | 4e9c8ee467dd87d41d5aaa3c5a487e3f05ffb79c (patch) | |
| tree | 84dab69712bfc49a205a42d4aadd163d27c6cb92 /parse.c | |
| parent | 8ddbf2e8157938e219ff2cf19da34b9c6f5f1d4f (diff) | |
| download | sparse-dev-4e9c8ee467dd87d41d5aaa3c5a487e3f05ffb79c.tar.gz | |
teach sparse about _Floatn and _Floatnx
It seems that some system headers (Debian x32's glibc) use
these types based on GCC's version without checking one of
the '__STDC_IEC_60559_<something>' macro. This, of course,
creates warnings and errors when using sparse on them.
Avoid these errors & warnings by letting sparse know about
these types.
Note: Full support would require changes in the parsing to
recognize the suffixes for constants ([fF]32, ...),
the conversion rules between these types and the
standard ones and probably and most others things,
all outside the scope of this patch.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -458,6 +458,11 @@ static struct init_keyword { { "__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 }, + { "_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 }, + { "_Float64x", NS_TYPEDEF, .type = &float64x_ctype, .op = &spec_op }, + { "_Float128", NS_TYPEDEF, .type = &float128_ctype, .op = &spec_op }, /* Extended types */ { "typeof", NS_TYPEDEF, .op = &typeof_op }, |
