This is the mail archive of the gcc-prs@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]

java/1388: Header generation incorrect with duplicate namespace names



>Number:         1388
>Category:       java
>Synopsis:       Header generation incorrect with duplicate namespace names
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:30 PST 2000
>Closed-Date:    Mon Aug 30 11:07:46 PDT 1999
>Last-Modified:  Mon Aug 30 11:07:46 PDT 1999
>Originator:     Paul Reilly
>Release:        2.95
>Organization:
>Environment:
i686-pc-linux-gnu (Redhat 6.0)
>Description:
The headers generated by gcjh are incorrect when a namespace
name occurs twice in different places.
>How-To-Repeat:
extern "Java"
{
  namespace A
  {
    namespace B
      {
        class ClassA;
      };
  };
  namespace C
  {
    namespace A
    {
      class ClassB;
    };
  };
};

class A::B::ClassA
{
};

class C::A::ClassB : public A::B::ClassA
{
};
>Fix:
Prefix any namespace with a duplicate with ::.
>Release-Note:

>Audit-Trail:

Formerly PR gcj/36

State-Changed-From-To: open->feedback
State-Changed-By: tromey
State-Changed-When: Thu Aug 26 11:12:30 1999
State-Changed-Why:
    I checked in a fix for this on the gcc trunk.
    Can you try it out?  If so, please do and get back to me.
    If not, tell me and I will just close this PR.

From: Tom Tromey <tromey@cygnus.com>
To: preilly@allaire.com
Cc: tromey@cygnus.com, apbianco@cygnus.com, green@cygnus.com,
        java-gnats@sourceware.cygnus.com
Subject: Re: gcj/36
Date: Sat, 28 Aug 1999 17:55:15 -0700

 >>>>> "Paul" == Paul Reilly <preilly@allaire.com> writes:
 
 Paul> I did a fresh checkout of the egcs truck and tried out gcjh on
 Paul> the java files from CLASSPATH.
 
 Hmm.
 
 Paul> I figured there was two ways to approach this problem.
 Paul> Prepending "::" to all namespaces and prepending "::" only when
 Paul> necessary.  Which approach did you take?
 
 Prepending to all of them.
 
 Can you try gcjh on the .class files in libgcj and see if it works
 there?
 
 Paul>   GtkGenericPeer (java::lang::Object *);
 
 My gcjh generates decls with "::java::lang::Object *", which leads me
 to suspect that you're still picking up the wrong gcjh.
 
 Tom

From: Paul Reilly <preilly@allaire.com>
To: tromey@cygnus.com
Cc: apbianco@cygnus.com, green@cygnus.com, java-gnats@sourceware.cygnus.com
Subject: Re: gcj/36
Date: Mon, 30 Aug 1999 08:52:13 -0400

 Tom Tromey <tromey@cygnus.com> writes:
 
  > My gcjh generates decls with "::java::lang::Object *", which leads
  > me to suspect that you're still picking up the wrong gcjh.
 
 That was the case.  Sorry about that and thanks for the fix.
 
 -Paul
State-Changed-From-To: feedback->closed
State-Changed-By: tromey
State-Changed-When: Mon Aug 30 11:07:46 1999
State-Changed-Why:
    Fix verified
>Unformatted:



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