This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: GCJ adding extra underscore to enum value symbol name?


It appears to partially work. The underscore is gone, but the integer after the class 
name part of the mangled name is one too high. eg.:

Java:
_ZN8TestEnum23TEST_TEST_PREREQUISITEE

C++:
_ZN8TestEnum22TEST_TEST_PREREQUISITEE


Fred


Quoting Andrew Haley <aph@gcc.gnu.org>:
> 
> You've hit a bug in append_unicode_mangled_name().  The fix might be
> as simple as this:
> 
> Index: mangle_name.c
> ===================================================================
> --- mangle_name.c	(revision 123084)
> +++ mangle_name.c	(working copy)
> @@ -84,7 +84,10 @@
>        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
>  	{
> 
> Let us know if this works.
> 
> Andrew.
> 

------------------------------------------------------------------------------------
X-Mail.net Communications Center




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