aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-29 14:10:06 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-09-26 18:10:09 +0200
commit686de6f296f2720e5667bd93b867a8342ad59ed1 (patch)
tree3da5bee9f25dbb00c52466057b1cdfa2581fb07b /evaluate.c
parentf60446f2ea3a8fa3442ac5c33a718798fec41ed2 (diff)
downloadsparse-686de6f296f2720e5667bd93b867a8342ad59ed1.tar.gz
shorter message for non-scalar in conditionals
The diagnostic message is a bit long with the non-really-informative part 'incorrect type' first and the explanation later in parentheses. Change this by using a shorter message "non-scalar type in ...". Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index 3821bb3d..f6dfcced 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -910,7 +910,7 @@ static struct symbol *evaluate_conditional(struct expression *expr, int iterator
if (Waddress)
warning(expr->pos, "the address of %s will always evaluate as true", "an array");
} else if (!is_scalar_type(ctype)) {
- sparse_error(expr->pos, "incorrect type in conditional (non-scalar type):");
+ sparse_error(expr->pos, "non-scalar type in conditional:");
info(expr->pos, " %s", show_typename(ctype));
return NULL;
}