diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/c-exp.y | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3deb474..f4f0c0c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-02-10 Philippe Waroquiers <philippe.waroquiers@skynet.be> + + * c-exp.y (direct_abs_decl): Use emplace_back to record the + type_stack. + 2019-02-10 Joel Brobecker <brobecker@adacore.com> * ada-varobj.c (ada_value_is_changeable_p): Add handling of diff --git a/gdb/c-exp.y b/gdb/c-exp.y index f3ef23c..508e9ef 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1215,12 +1215,14 @@ direct_abs_decl: '(' abs_decl ')' push_type_int ($2); push_type (tp_array); $$ = get_type_stack (); + cpstate->type_stacks.emplace_back ($$); } | array_mod { push_type_int ($1); push_type (tp_array); $$ = get_type_stack (); + cpstate->type_stacks.emplace_back ($$); } | direct_abs_decl func_mod @@ -1228,11 +1230,13 @@ direct_abs_decl: '(' abs_decl ')' push_type_stack ($1); push_typelist ($2); $$ = get_type_stack (); + cpstate->type_stacks.emplace_back ($$); } | func_mod { push_typelist ($1); $$ = get_type_stack (); + cpstate->type_stacks.emplace_back ($$); } ; |