summaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:12:15 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:12:15 +0000
commitc806c55a0672b52f228ce56f5bf57f065c447506 (patch)
tree1ba1bd00de1325503ac16e28493fec8e1d0ef10a /gdb/f-exp.y
parentfbb06eb1ba120adde645d64133f5a9bbf2d62ec7 (diff)
* 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/f-exp.y')
-rw-r--r--gdb/f-exp.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 1aacc37823..108f1bde41 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -328,7 +328,9 @@ complexnum: exp ',' exp
;
exp : '(' complexnum ')'
- { write_exp_elt_opcode(OP_COMPLEX); }
+ { write_exp_elt_opcode(OP_COMPLEX);
+ write_exp_elt_type (parse_f_type->builtin_complex_s16);
+ write_exp_elt_opcode(OP_COMPLEX); }
;
exp : '(' type ')' exp %prec UNARY