+2019-08-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl2.c (grok_array_decl): Use the location of the open square
+ bracket in error message about invalid types.
+
2019-08-14 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): Check here for typedef a function
array_expr = p2, index_exp = i1;
else
{
- error ("invalid types %<%T[%T]%> for array subscript",
- type, TREE_TYPE (index_exp));
+ error_at (loc, "invalid types %<%T[%T]%> for array subscript",
+ type, TREE_TYPE (index_exp));
return error_mark_node;
}
+2019-08-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/conversion/simd4.C: Test locations.
+
2019-08-14 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/peel_ind_1.c: Look for an inverted .B VL1.
foo ()
{
b[t];
- b[u]; // { dg-error "invalid types" }
- b[v]; // { dg-error "invalid types" }
- b[w]; // { dg-error "invalid types" }
+ b[u]; // { dg-error "4:invalid types" }
+ b[v]; // { dg-error "4:invalid types" }
+ b[w]; // { dg-error "4:invalid types" }
t[b];
- u[b]; // { dg-error "invalid types" }
- v[b]; // { dg-error "invalid types" }
- w[b]; // { dg-error "invalid types" }
+ u[b]; // { dg-error "4:invalid types" }
+ v[b]; // { dg-error "4:invalid types" }
+ w[b]; // { dg-error "4:invalid types" }
new int[t];
new int[u]; // { dg-error "new-declarator must have integral" }
new int[v]; // { dg-error "new-declarator must have integral" }