diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:12:15 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:12:15 +0000 |
commit | c806c55a0672b52f228ce56f5bf57f065c447506 (patch) | |
tree | 1ba1bd00de1325503ac16e28493fec8e1d0ef10a /gdb/eval.c | |
parent | fbb06eb1ba120adde645d64133f5a9bbf2d62ec7 (diff) | |
download | gdb-c806c55a0672b52f228ce56f5bf57f065c447506.zip gdb-c806c55a0672b52f228ce56f5bf57f065c447506.tar.gz gdb-c806c55a0672b52f228ce56f5bf57f065c447506.tar.bz2 |
* expression.h (enum exp_opcode): Document OP_COMPLEX to take
a type parameter as expression element.
* eval.c (evaluate_subexp_standard) [OP_COMPLEX]: Retrieve result
type as expression element.
* f-exp.y: Pass in type when buildin OP_COMPLEX expression.
* parse.c (operator_length_standard): Update length of OP_COMPLEX.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1369,10 +1369,11 @@ evaluate_subexp_standard (struct type *expect_type, case OP_COMPLEX: /* We have a complex number, There should be 2 floating point numbers that compose it */ + (*pos) += 2; arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside); - return value_literal_complex (arg1, arg2, builtin_type_f_complex_s16); + return value_literal_complex (arg1, arg2, exp->elts[pc + 1].type); case STRUCTOP_STRUCT: tem = longest_to_int (exp->elts[pc + 1].longconst); |