Improve error message for invalid types in array access.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 17 Jun 2011 04:54:28 +0000 (06:54 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 17 Jun 2011 09:20:38 +0000 (11:20 +0200)
parser.c

index d05f5c2..3aa601d 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -7176,9 +7176,7 @@ check_idx:
                }
        } else {
                if (is_type_valid(type_left) && is_type_valid(type_inside)) {
-                       errorf(&expr->base.source_position,
-                               "array access on object with non-pointer types '%T', '%T'",
-                               orig_type_left, orig_type_inside);
+                       errorf(&expr->base.source_position, "invalid types '%T[%T]' for array access", orig_type_left, orig_type_inside);
                }
                res_type = type_error_type;
                ref      = left;