Commit 2307e075 by Ian Lance Taylor Committed by Ian Lance Taylor

cp-demangle.c (d_identifier): In Java mode, skip an optional '$' after the identifier.

	* cp-demangle.c (d_identifier): In Java mode, skip an optional '$'
	after the identifier.
	* testsuite/demangle-expected: Add test case.

From-SVN: r74885
parent 3101fa3c
2003-12-20 Ian Lance Taylor <ian@wasabisystems.com>
* cp-demangle.c (d_identifier): In Java mode, skip an optional '$'
after the identifier.
* testsuite/demangle-expected: Add test case.
2003-12-19 Ian Lance Taylor <ian@wasabisystems.com> 2003-12-19 Ian Lance Taylor <ian@wasabisystems.com>
Fix for PR c++/13447: Fix for PR c++/13447:
......
...@@ -1341,6 +1341,13 @@ d_identifier (di, len) ...@@ -1341,6 +1341,13 @@ d_identifier (di, len)
name = d_str (di); name = d_str (di);
d_advance (di, len); d_advance (di, len);
/* A Java mangled name may have a trailing '$' if it is a C++
keyword. This '$' is not included in the length count. We just
ignore the '$'. */
if ((di->options & DMGL_JAVA) != 0
&& d_peek_char (di) == '$')
d_advance (di, 1);
/* Look for something which looks like a gcc encoding of an /* Look for something which looks like a gcc encoding of an
anonymous namespace, and replace it with a more user friendly anonymous namespace, and replace it with a more user friendly
name. */ name. */
......
...@@ -2591,6 +2591,10 @@ Prim.i(int, boolean, byte, double, float, char, java.lang.String, short, long) ...@@ -2591,6 +2591,10 @@ Prim.i(int, boolean, byte, double, float, char, java.lang.String, short, long)
_ZN4java4util14Map__U24_Entry11class__U24_E _ZN4java4util14Map__U24_Entry11class__U24_E
java.util.Map$Entry.class$ java.util.Map$Entry.class$
# #
--format=java
_ZN3org7eclipse3cdt5debug8internal4core5model9CVariable6sizeof$Ev
org.eclipse.cdt.debug.internal.core.model.CVariable.sizeof()
#
--format=hp --format=hp
_Utf58_0_1__1_2147483647__2147483648 _Utf58_0_1__1_2147483647__2147483648
_Utf58_0_1__1_2147483647__2147483648 _Utf58_0_1__1_2147483647__2147483648
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment