* valops.c (value_one): Reimplement broken decimal-float case.
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 24 Jun 2009 16:51:57 +0000 (16:51 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 24 Jun 2009 16:51:57 +0000 (16:51 +0000)
gdb/ChangeLog
gdb/valops.c

index fff6bba1b3890a1a654cdacd3ff8d109b7ab00d1..95d41e5b47a84c04bb17d3d234b919b2595fd790 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * valops.c (value_one): Reimplement broken decimal-float case.
+
 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * eval.c (evaluate_subexp_standard): Use expression architecture
index 05585c997af25c5048d045181a3699064beca34f..1d193939aad5236c67b1d2c1ddad5c173b066e97 100644 (file)
@@ -537,15 +537,12 @@ struct value *
 value_one (struct type *type, enum lval_type lv)
 {
   struct type *type1 = check_typedef (type);
-  struct value *val = NULL; /* avoid -Wall warning */
+  struct value *val;
 
   if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT)
     {
-      struct value *int_one = value_from_longest (builtin_type_int32, 1);
-      struct value *val;
       gdb_byte v[16];
-
-      decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int32));
+      decimal_from_string (v, TYPE_LENGTH (type), "1");
       val = value_from_decfloat (type, v);
     }
   else if (TYPE_CODE (type1) == TYPE_CODE_FLT)
This page took 0.029677 seconds and 4 git commands to generate.