public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/28474]  New: mangle_name.c mangles names unecessarily
@ 2006-07-24 21:04 gcc-bugzilla at seibutsu dot mailsnare dot net
  2006-07-24 21:07 ` [Bug java/28474] " gcc-bugzilla at seibutsu dot mailsnare dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at seibutsu dot mailsnare dot net @ 2006-07-24 21:04 UTC (permalink / raw)
  To: java-prs

There is a bug in mangle_name.c which leads to mangling any name containing two
underscores followed by a capital "U", even if those three characters are not
consecutive.  For example, the following program will not link:

[begin Test.java]
public class Test {
  public static final native void x_y_NewUser();
  public static final native void xy__User();

  public static void main(String[] args) {
    x_y_NewUser();
    xy__User();
  }
}
[end Test.java]

[begin natTest.cpp]
#include "Test.h"

void Test::x_y_NewUser() {
  return;
}

void Test::xy__User() {
  return;
}
[end natTest.cpp]

I will attach a patch which fixes the first case but not the second (since I'm
not sure how the second case was intended to be handled).


-- 
           Summary: mangle_name.c mangles names unecessarily
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at seibutsu dot mailsnare dot net
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28474


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug java/28474] mangle_name.c mangles names unecessarily
  2006-07-24 21:04 [Bug java/28474] New: mangle_name.c mangles names unecessarily gcc-bugzilla at seibutsu dot mailsnare dot net
@ 2006-07-24 21:07 ` gcc-bugzilla at seibutsu dot mailsnare dot net
  2008-08-22  1:01 ` mhesseli at fulcrummicro dot com
  2009-10-20 16:01 ` aph at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: gcc-bugzilla at seibutsu dot mailsnare dot net @ 2006-07-24 21:07 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from gcc-bugzilla at seibutsu dot mailsnare dot net  2006-07-24 21:07 -------
Created an attachment (id=11931)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11931&action=view)
patch to reset uuU variable when a non-underscore is encountered


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28474


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug java/28474] mangle_name.c mangles names unecessarily
  2006-07-24 21:04 [Bug java/28474] New: mangle_name.c mangles names unecessarily gcc-bugzilla at seibutsu dot mailsnare dot net
  2006-07-24 21:07 ` [Bug java/28474] " gcc-bugzilla at seibutsu dot mailsnare dot net
@ 2008-08-22  1:01 ` mhesseli at fulcrummicro dot com
  2009-10-20 16:01 ` aph at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mhesseli at fulcrummicro dot com @ 2008-08-22  1:01 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from mhesseli at fulcrummicro dot com  2008-08-22 01:01 -------
Over the past month I have been trying to make a largish Java project
accessible from Perl using SWIG and GCJ. I have been very pleased with the way
GCJ allowed me to accomplish this. Unfortunately, late in the project I was hit
by this bug; several of the enumerations used in the Java code contained
uppercase U's which were converted to _U (underscore followed by uppercase U).
This eventually resulted in linking errors.

The patch attached to this bug solved the issue on GCC 4.3.1. I would therefore
like to add my vote for this patch to be submitted to what is going to be GCC
4.4.


-- 

mhesseli at fulcrummicro dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mhesseli at fulcrummicro dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28474


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug java/28474] mangle_name.c mangles names unecessarily
  2006-07-24 21:04 [Bug java/28474] New: mangle_name.c mangles names unecessarily gcc-bugzilla at seibutsu dot mailsnare dot net
  2006-07-24 21:07 ` [Bug java/28474] " gcc-bugzilla at seibutsu dot mailsnare dot net
  2008-08-22  1:01 ` mhesseli at fulcrummicro dot com
@ 2009-10-20 16:01 ` aph at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: aph at gcc dot gnu dot org @ 2009-10-20 16:01 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from aph at gcc dot gnu dot org  2009-10-20 16:01 -------
Subject: Bug 28474

Author: aph
Date: Tue Oct 20 16:01:21 2009
New Revision: 153021

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153021
Log:
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.


Modified:
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/mangle_name.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28474


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-20 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-24 21:04 [Bug java/28474] New: mangle_name.c mangles names unecessarily gcc-bugzilla at seibutsu dot mailsnare dot net
2006-07-24 21:07 ` [Bug java/28474] " gcc-bugzilla at seibutsu dot mailsnare dot net
2008-08-22  1:01 ` mhesseli at fulcrummicro dot com
2009-10-20 16:01 ` aph at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).