diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-21 01:58:53 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-21 01:58:53 +0000 |
commit | e9b1be72e8c51f2f935e82733151993527722cad (patch) | |
tree | 7f36d32b649117c432fd4d50913d0ac71b47d393 /libiberty | |
parent | 3af97df7ac22a2392b5b59ed1bd77809c351d2da (diff) | |
download | gcc-e9b1be72e8c51f2f935e82733151993527722cad.tar.gz |
PR c++/42338
* mangle.c (write_expression): Handle tree codes that have extra
arguments in the middle-end.
* cp-demangle.c (d_print_comp): Fix array index printing.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156103 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 6d30823569a..1e2fbffdf74 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index d37c90efc2d..f28e1636921 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -4037,9 +4037,18 @@ d_print_comp (struct d_print_info *dpi, 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 |