Make -verbose-errors the default; -terse-errors to disable it

This commit is contained in:
gingerBill
2023-02-22 11:48:10 +00:00
parent f5d507a9b9
commit 090e30f07b
5 changed files with 40 additions and 12 deletions

View File

@@ -1679,9 +1679,13 @@ gb_internal bool check_unary_op(CheckerContext *c, Operand *o, Token op) {
case Token_Not:
if (!is_type_boolean(type)) {
ERROR_BLOCK();
str = expr_to_string(o->expr);
error(op, "Operator '%.*s' is only allowed on boolean expression", LIT(op.string));
error(op, "Operator '%.*s' is only allowed on boolean expressions", LIT(op.string));
gb_string_free(str);
if (is_type_integer(type)) {
error_line("\tSuggestion: Did you mean to use the bitwise not operator '~'?\n");
}
}
break;