diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-24 16:51:57 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-24 16:51:57 +0000 |
commit | 4e608b4f2ee7213a9b161ff91b9a8a852dac3486 (patch) | |
tree | 9b159c769862c0b7d086df17acf0164c9df167e8 /gdb/valops.c | |
parent | 34e13b5b1eb2661e03ce86b039256328857ba2d8 (diff) | |
download | gdb-4e608b4f2ee7213a9b161ff91b9a8a852dac3486.zip gdb-4e608b4f2ee7213a9b161ff91b9a8a852dac3486.tar.gz gdb-4e608b4f2ee7213a9b161ff91b9a8a852dac3486.tar.bz2 |
* valops.c (value_one): Reimplement broken decimal-float case.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 05585c9..1d19393 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -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) |