aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index bca3d6d..a7f7320 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -318,6 +318,17 @@ arglist : arglist ',' exp %prec ABOVE_COMMA
{ arglist_len++; }
;
+exp : '{'
+ /* This is to save the value of arglist_len
+ being accumulated by an outer function call. */
+ { start_arglist (); }
+ arglist '}' %prec ARROW
+ { write_exp_elt_opcode (OP_ARRAY);
+ write_exp_elt_longcst ((LONGEST) 0);
+ write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
+ write_exp_elt_opcode (OP_ARRAY); }
+ ;
+
exp : '{' type '}' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_MEMVAL);
write_exp_elt_type ($2);