* valops.c (value_one): Reimplement broken decimal-float case.
This commit is contained in:
parent
34e13b5b1e
commit
4e608b4f2e
2 changed files with 6 additions and 5 deletions
|
@ -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>
|
2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* eval.c (evaluate_subexp_standard): Use expression architecture
|
* eval.c (evaluate_subexp_standard): Use expression architecture
|
||||||
|
|
|
@ -537,15 +537,12 @@ struct value *
|
||||||
value_one (struct type *type, enum lval_type lv)
|
value_one (struct type *type, enum lval_type lv)
|
||||||
{
|
{
|
||||||
struct type *type1 = check_typedef (type);
|
struct type *type1 = check_typedef (type);
|
||||||
struct value *val = NULL; /* avoid -Wall warning */
|
struct value *val;
|
||||||
|
|
||||||
if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT)
|
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];
|
gdb_byte v[16];
|
||||||
|
decimal_from_string (v, TYPE_LENGTH (type), "1");
|
||||||
decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int32));
|
|
||||||
val = value_from_decfloat (type, v);
|
val = value_from_decfloat (type, v);
|
||||||
}
|
}
|
||||||
else if (TYPE_CODE (type1) == TYPE_CODE_FLT)
|
else if (TYPE_CODE (type1) == TYPE_CODE_FLT)
|
||||||
|
|
Loading…
Add table
Reference in a new issue