Update error on omitting end.

This commit is contained in:
Christoffer Lerno
2026-01-17 15:37:30 +01:00
parent aa07969fc2
commit d00a93f195

View File

@@ -4498,7 +4498,7 @@ INLINE bool sema_expr_analyse_range_internal(SemaContext *context, Range *range,
{
if (indexed_type->type_kind == TYPE_POINTER && type_is_any_arraylike(indexed_type->pointer))
{
RETURN_SEMA_ERROR(start, "Omitting the end index is not allowed for pointers, did you perhaps forget to dereference the pointer before slicing wih []?");
RETURN_SEMA_ERROR(start, "Omitting the end index is not allowed for pointers, did you perhaps forget to dereference the pointer before slicing wih []? E.g. you wrote '*foo[..]' instead '(*foo)[..]'.");
}
RETURN_SEMA_ERROR(start, "Omitting end index is not allowed for pointers or flexible array members.");
}