diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-02-22 23:05:25 +0000 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2008-04-03 13:43:07 -0700 |
commit | 64b65ec931369939014995e65b682effa7c0a654 (patch) | |
tree | b23b7164f4a9caaf32533a20a670b799b133e7ef /evaluate.c | |
parent | saner warnings for restricted types (diff) | |
download | sparse-64b65ec931369939014995e65b682effa7c0a654.tar.gz sparse-64b65ec931369939014995e65b682effa7c0a654.tar.bz2 sparse-64b65ec931369939014995e65b682effa7c0a654.zip |
fix show_typename()
* postfix stuff had been applied in wrong order (e.g. int a[2][3] generated
int [addressable][toplevel] a[3][2])
* after fixing that, we've no need for recursion anymore, a bunch of arguments
go away and turn into local variables and we get an easy way to get rid of
bogus space in the show_typename() result.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[Josh: fix test suite to match]
Signed-off-by: Josh Triplett <josh@kernel.org>
Diffstat (limited to 'evaluate.c')
-rw-r--r-- | evaluate.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -502,7 +502,7 @@ static inline void unrestrict(struct expression *expr, if (class & TYPE_RESTRICT) { if (class & TYPE_FOULED) *ctype = unfoul(*ctype); - warning(expr->pos, "%sdegrades to integer", + warning(expr->pos, "%s degrades to integer", show_typename(*ctype)); *ctype = (*ctype)->ctype.base_type; /* get to arithmetic type */ } @@ -1802,7 +1802,7 @@ static struct symbol *evaluate_preop(struct expression *expr) expr->right->ctype = ctype; expr->right->fvalue = 0; } else if (is_fouled_type(ctype)) { - warning(expr->pos, "%sdegrades to integer", + warning(expr->pos, "%s degrades to integer", show_typename(ctype->ctype.base_type)); } ctype = &bool_ctype; |