+2010-01-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/42338
+ * cp-demangle.c (d_print_comp): Fix array index printing.
+
2010-01-11 Tristan Gingold <gingold@adacore.com>
* cplus-dem.c (ada_demangle): Remove prototype.
d_append_char (dpi, '(');
d_print_subexpr (dpi, d_left (d_right (dc)));
- if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0)
- d_print_expr_op (dpi, d_left (dc));
- d_print_subexpr (dpi, d_right (d_right (dc)));
+ if (strcmp (d_left (dc)->u.s_operator.op->code, "ix") == 0)
+ {
+ d_append_char (dpi, '[');
+ d_print_comp (dpi, d_right (d_right (dc)));
+ d_append_char (dpi, ']');
+ }
+ else
+ {
+ if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0)
+ d_print_expr_op (dpi, d_left (dc));
+ d_print_subexpr (dpi, d_right (d_right (dc)));
+ }
if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR
&& d_left (dc)->u.s_operator.op->len == 1