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@xxxxxxxxx> --- evaluate.c | 2 +- validation/bad-type-twice0.c | 2 +- validation/conditional-type.c | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/evaluate.c b/evaluate.c index 3821bb3d7..f6dfcced7 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; } diff --git a/validation/bad-type-twice0.c b/validation/bad-type-twice0.c index 45234699e..9e834d47d 100644 --- a/validation/bad-type-twice0.c +++ b/validation/bad-type-twice0.c @@ -7,7 +7,7 @@ static int foo(a) * check-name: bad-type-twice0 * * check-error-start -bad-type-twice0.c:3:16: error: incorrect type in conditional (non-scalar type): +bad-type-twice0.c:3:16: error: non-scalar type in conditional: bad-type-twice0.c:3:16: incomplete type a * check-error-end */ diff --git a/validation/conditional-type.c b/validation/conditional-type.c index 34cfcc687..6e2da9b52 100644 --- a/validation/conditional-type.c +++ b/validation/conditional-type.c @@ -79,21 +79,21 @@ static int good_if_ptr(void *ptr) * check-name: conditional-type * * check-error-start -conditional-type.c:18:18: error: incorrect type in conditional (non-scalar type): +conditional-type.c:18:18: error: non-scalar type in conditional: conditional-type.c:18:18: void -conditional-type.c:19:13: error: incorrect type in conditional (non-scalar type): +conditional-type.c:19:13: error: non-scalar type in conditional: conditional-type.c:19:13: struct state s -conditional-type.c:24:18: error: incorrect type in conditional (non-scalar type): +conditional-type.c:24:18: error: non-scalar type in conditional: conditional-type.c:24:18: void -conditional-type.c:29:21: error: incorrect type in conditional (non-scalar type): +conditional-type.c:29:21: error: non-scalar type in conditional: conditional-type.c:29:21: void -conditional-type.c:30:16: error: incorrect type in conditional (non-scalar type): +conditional-type.c:30:16: error: non-scalar type in conditional: conditional-type.c:30:16: struct state s -conditional-type.c:34:21: error: incorrect type in conditional (non-scalar type): +conditional-type.c:34:21: error: non-scalar type in conditional: conditional-type.c:34:21: void -conditional-type.c:36:20: error: incorrect type in conditional (non-scalar type): +conditional-type.c:36:20: error: non-scalar type in conditional: conditional-type.c:36:20: void -conditional-type.c:40:21: error: incorrect type in conditional (non-scalar type): +conditional-type.c:40:21: error: non-scalar type in conditional: conditional-type.c:40:21: void * check-error-end */ -- 2.23.0