summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2008-12-18 15:56:12 +0000
committerDJ Delorie <dj@delorie.com>2008-12-18 15:56:12 +0000
commit2e0de2eacfba9ae40ea6c05dda20be85568261f9 (patch)
treea5c82b7954319779336a91c2fba6c8b49c516ca7
parent034f7c326492c6cd604d390e369b95a661670d39 (diff)
downloadbinutils-redhat-2e0de2eacfba9ae40ea6c05dda20be85568261f9.tar.gz
merge from gcc
-rw-r--r--libiberty/ChangeLog13
-rw-r--r--libiberty/cp-demangle.c9
2 files changed, 21 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index a6721bf906..f46fe05f37 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,16 @@
+2008-12-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/38561
+ * cp-demangle.c (d_expression, d_print_comp): Revert
+ cast changes.
+
+2008-12-17 Jason Merrill <jason@redhat.com>
+
+ * cp-demangle.c (d_expression): Handle rvalue stubs too.
+ [DEMANGLE_COMPONENT_CAST]: Update mangling.
+ (d_print_comp): Avoid extra ", " with empty template argument packs.
+ Remove handling for obsolete T() mangling.
+
2008-12-10 Jason Merrill <jason@redhat.com>
* cp-demangle.c (cplus_demangle_type): Support fixed-point types.
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index de0d9f7610..5ae04c068f 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2561,7 +2561,8 @@ d_expression (struct d_info *di)
d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
d_template_args (di)));
}
- else if (peek == 's' && d_peek_next_char (di) == 'T')
+ else if (peek == 's'
+ && (d_peek_next_char (di) == 'T' || d_peek_next_char (di) == 'R'))
{
/* Just demangle a parameter placeholder as its type. */
d_advance (di, 2);
@@ -3763,8 +3764,14 @@ d_print_comp (struct d_print_info *dpi,
d_print_comp (dpi, d_left (dc));
if (d_right (dc) != NULL)
{
+ size_t len;
d_append_string (dpi, ", ");
+ len = dpi->len;
d_print_comp (dpi, d_right (dc));
+ /* If that didn't print anything (which can happen with empty
+ template argument packs), remove the comma and space. */
+ if (dpi->len == len)
+ dpi->len -= 2;
}
return;