This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/28474: mangle_name.c mangles names unecessarily


Committed on behalf of Joel.

Andrew.


2009-10-20  Joel Dice <dicej@mailsnare.net>

        PR java/28474
        * mangle_name.c (append_unicode_mangled_name): Fix mangling
        of names with multiple underscores and "U".
        (unicode_mangling_length): Likewise.

Index: java/mangle_name.c
===================================================================
--- java/mangle_name.c  (revision 153017)
+++ java/mangle_name.c  (working copy)
@@ -266,7 +266,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
        {
@@ -321,7 +324,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
        {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]