Modernize configure.ac's
[deliverable/binutils-gdb.git] / gdb / valarith.c
index 3e349f23f5b8720a133530fb75fc0af5cda714f8..7959f3b2215eff75058e025dd9f34594e40842aa 100644 (file)
@@ -1,6 +1,6 @@
 /* Perform arithmetic and other operations on values, for GDB.
 
-   Copyright (C) 1986-2015 Free Software Foundation, Inc.
+   Copyright (C) 1986-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -198,7 +198,14 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
 
   if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
                             && elt_offs >= type_length_units (array_type)))
-    error (_("no such vector element"));
+    {
+      if (type_not_associated (array_type))
+        error (_("no such vector element (vector not associated)"));
+      else if (type_not_allocated (array_type))
+        error (_("no such vector element (vector not allocated)"));
+      else
+        error (_("no such vector element"));
+    }
 
   if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
     v = allocate_value_lazy (elt_type);
This page took 0.023795 seconds and 4 git commands to generate.