* value.h (coerce_enum, coerce_number): Remove prototypes.
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:16:14 +0000 (14:16 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:16:14 +0000 (14:16 +0000)
* value.c (coerce_enum, coerce_number): Remove.
* valarith.c (value_x_binop): Do not call coerce_enum.
(value_x_unop): Likewise.
(value_logical_not): Call coerce_array instead of coerce_number.

gdb/ChangeLog
gdb/valarith.c
gdb/value.c
gdb/value.h

index c6761abe1adefa2404192dcc30134844f2cc99bc..40dbd2287826f6cbb18c444b27e57400e04ebb01 100644 (file)
@@ -1,3 +1,11 @@
+2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * value.h (coerce_enum, coerce_number): Remove prototypes.
+       * value.c (coerce_enum, coerce_number): Remove.
+       * valarith.c (value_x_binop): Do not call coerce_enum.
+       (value_x_unop): Likewise.
+       (value_logical_not): Call coerce_array instead of coerce_number.
+
 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * ax-gdb.c: Include "language.h".
index b4bce730593d553aaf04ff8bfd205022fa16778e..b9b36570fe2bcebb4ee62fa85c799b540fff9436 100644 (file)
@@ -359,8 +359,6 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
 
   arg1 = coerce_ref (arg1);
   arg2 = coerce_ref (arg2);
-  arg1 = coerce_enum (arg1);
-  arg2 = coerce_enum (arg2);
 
   /* now we know that what we have to do is construct our
      arg vector and find the right function to call it with.  */
@@ -520,7 +518,6 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
   int static_memfuncp, nargs;
 
   arg1 = coerce_ref (arg1);
-  arg1 = coerce_enum (arg1);
 
   /* now we know that what we have to do is construct our
      arg vector and find the right function to call it with.  */
@@ -1287,7 +1284,7 @@ value_logical_not (struct value *arg1)
   const gdb_byte *p;
   struct type *type1;
 
-  arg1 = coerce_number (arg1);
+  arg1 = coerce_array (arg1);
   type1 = check_typedef (value_type (arg1));
 
   if (TYPE_CODE (type1) == TYPE_CODE_FLT)
index b38bae064a3c1527ef31313d32fe3ae03391a697..c0e6c99b36736340fc6e556acddd1e009e6cb1b8 100644 (file)
@@ -1700,22 +1700,6 @@ coerce_array (struct value *arg)
     arg = value_coerce_function (arg);
   return arg;
 }
-
-struct value *
-coerce_number (struct value *arg)
-{
-  arg = coerce_array (arg);
-  arg = coerce_enum (arg);
-  return arg;
-}
-
-struct value *
-coerce_enum (struct value *arg)
-{
-  if (TYPE_CODE (check_typedef (value_type (arg))) == TYPE_CODE_ENUM)
-    arg = value_cast (builtin_type_unsigned_int, arg);
-  return arg;
-}
 \f
 
 /* Return true if the function returning the specified type is using
index ba89858a5f819363dadc10d029c9873c4b68baa0..9665303148dc86b14c98eb06ecf01fcab4f5019f 100644 (file)
@@ -230,17 +230,11 @@ extern short *deprecated_value_regnum_hack (struct value *);
 extern struct value *coerce_ref (struct value *value);
 
 /* If ARG is an array, convert it to a pointer.
-   If ARG is an enum, convert it to an integer.
    If ARG is a function, convert it to a function pointer.
 
    References are dereferenced.  */
 
 extern struct value *coerce_array (struct value *value);
-extern struct value *coerce_number (struct value *value);
-
-/* If ARG is an enum, convert it to an integer.  */
-
-extern struct value *coerce_enum (struct value *value);
 
 /* Internal variables (variables for convenience of use of debugger)
    are recorded as a chain of these structures.  */
This page took 0.047783 seconds and 4 git commands to generate.