warning ("array or string index out of range");
if (upperbound > -1) warning ("array or string index out of range");
value_subscript (struct value *array, struct value *idx){  struct value *bound;  int c_style = current_language->c_style_arrays;  struct type *tarray;  COERCE_REF (array);  tarray = check_typedef (VALUE_TYPE (array));  COERCE_VARYING_ARRAY (array, tarray);  if (TYPE_CODE (tarray) == TYPE_CODE_ARRAY      || TYPE_CODE (tarray) == TYPE_CODE_STRING)    {      struct type *range_type = TYPE_INDEX_TYPE (tarray);      LONGEST lowerbound, upperbound;      get_discrete_bounds (range_type, &lowerbound, &upperbound);      if (VALUE_LVAL (array) != lval_memory)	return value_subscripted_rvalue (array, idx, lowerbound);      if (c_style == 0)	{	  LONGEST index = value_as_long (idx);	  if (index >= lowerbound && index <= upperbound)	    return value_subscripted_rvalue (array, idx, lowerbound);	  warning ("array or string index out of range");	  /* fall doing C stuff */	  c_style = 1;	}      if (lowerbound != 0)	{	  bound = value_from_longest (builtin_type_int, (LONGEST) lowerbound);	  idx = value_sub (idx, bound);	}      array = value_coerce_array (array);    }  if (TYPE_CODE (tarray) == TYPE_CODE_BITSTRING)    {      struct type *range_type = TYPE_INDEX_TYPE (tarray);      LONGEST index = value_as_long (idx);      struct value *v;      int offset, byte, bit_index;      LONGEST lowerbound, upperbound;      get_discrete_bounds (range_type, &lowerbound, &upperbound);      if (index < lowerbound || index > upperbound)	error ("bitstring index out of range");      index -= lowerbound;      offset = index / TARGET_CHAR_BIT;      byte = *((char *) VALUE_CONTENTS (array) + offset);      bit_index = index % TARGET_CHAR_BIT;      byte >>= (BITS_BIG_ENDIAN ? TARGET_CHAR_BIT - 1 - bit_index : bit_index);      v = value_from_longest (LA_BOOL_TYPE, byte & 1);      VALUE_BITPOS (v) = bit_index;      VALUE_BITSIZE (v) = 1;      VALUE_LVAL (v) = VALUE_LVAL (array);      if (VALUE_LVAL (array) == lval_internalvar)	VALUE_LVAL (v) = lval_internalvar_component;      VALUE_ADDRESS (v) = VALUE_ADDRESS (array);      VALUE_OFFSET (v) = offset + VALUE_OFFSET (array);      return v;    }  if (c_style)    return value_ind (value_add (array, idx));  else    error ("not an array or string");}