Add decfloat registers to float reggroup
[deliverable/binutils-gdb.git] / gdb / valarith.c
index d2dd5900647473ece117d4ac9102a36363222ebf..807cdd5dbd4d1e2a4def2d08ab739010e3dcc53e 100644 (file)
@@ -189,8 +189,11 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
   ULONGEST elt_size = type_length_units (elt_type);
   ULONGEST elt_offs = elt_size * (index - lowerbound);
 
-  if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
-                            && elt_offs >= type_length_units (array_type)))
+  if (index < lowerbound
+      || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
+          && elt_offs >= type_length_units (array_type))
+      || (VALUE_LVAL (array) != lval_memory
+          && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)))
     {
       if (type_not_associated (array_type))
         error (_("no such vector element (vector not associated)"));
@@ -504,9 +507,6 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
     }
   throw_error (NOT_FOUND_ERROR,
                _("member function %s not found"), tstr);
-#ifdef lint
-  return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1);
-#endif
 }
 
 /* We know that arg1 is a structure, so try to find a unary user
@@ -622,8 +622,6 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
     }
   throw_error (NOT_FOUND_ERROR,
                _("member function %s not found"), tstr);
-
-  return 0;                    /* For lint -- never reached */
 }
 \f
 
@@ -1533,10 +1531,7 @@ value_equal (struct value *arg1, struct value *arg2)
       return value_strcmp (arg1, arg2) == 0;
     }
   else
-    {
-      error (_("Invalid type combination in equality test."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Invalid type combination in equality test."));
 }
 
 /* Compare values based on their raw contents.  Useful for arrays since
@@ -1628,10 +1623,7 @@ value_pos (struct value *arg1)
       || (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)))
     return value_from_contents (type, value_contents (arg1));
   else
-    {
-      error (_("Argument to positive operation not a number."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Argument to positive operation not a number."));
 }
 
 struct value *
@@ -1663,10 +1655,7 @@ value_neg (struct value *arg1)
       return val;
     }
   else
-    {
-      error (_("Argument to negate operation not a number."));
-      return 0;                        /* For lint -- never reached.  */
-    }
+    error (_("Argument to negate operation not a number."));
 }
 
 struct value *
This page took 0.025358 seconds and 4 git commands to generate.