[PATCH] reset uuU variable in mangle_name.c when a non-underscore is encountered

Joel Dice dicej@mailsnare.net
Sun Apr 1 16:14:00 GMT 2007


The following patch addresses 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28474.  Please CC me on any 
responses, since I do not follow this list.  Thanks.

diff --git a/gcc/java/mangle_name.c b/gcc/java/mangle_name.c
index 61977a8..28b7500 100644
--- a/gcc/java/mangle_name.c
+++ b/gcc/java/mangle_name.c
@@ -84,7 +84,10 @@ append_unicode_mangled_name (const char
        int ch = UTF8_GET(ptr, limit);

        if ((ISALNUM (ch) && ch != 'U') || ch == '$')
-	obstack_1grow (mangle_obstack, ch);
+        {
+	  obstack_1grow (mangle_obstack, ch);
+          uuU = 0;
+        }
        /* Everything else needs encoding */
        else
  	{
@@ -139,7 +142,10 @@ unicode_mangling_length (const char *nam
        if (ch < 0)
  	error ("internal error - invalid Utf8 name");
        if ((ISALNUM (ch) && ch != 'U') || ch == '$')
-	num_chars++;
+        {
+	  num_chars++;
+          uuU = 0;
+        }
        /* Everything else needs encoding */
        else
  	{




More information about the Java-patches mailing list