* eval.c (evaluate_subexp_standard): Assert that there is at

least one array dimension.
This commit is contained in:
Daniel Jacobowitz 2008-11-04 15:32:54 +00:00
parent a03db8620f
commit 1c9f699cd9
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-11-04 Daniel Jacobowitz <dan@codesourcery.com>
* eval.c (evaluate_subexp_standard): Assert that there is at
least one array dimension.
2008-11-03 Vladimir Prus <vladimir@codesourcery.com>
Make attach_command exception-safe

View File

@ -1976,6 +1976,8 @@ evaluate_subexp_standard (struct type *expect_type,
if (nargs != ndimensions)
error (_("Wrong number of subscripts"));
gdb_assert (nargs > 0);
/* Now that we know we have a legal array subscript expression
let us actually find out where this element exists in the array. */