From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6288 invoked by alias); 11 May 2004 15:40:02 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 6270 invoked by uid 48); 11 May 2004 15:40:02 -0000 Date: Tue, 11 May 2004 15:40:00 -0000 From: "nmoyere at calendra dot com" To: java-prs@gcc.gnu.org Message-ID: <20040511154000.15377.nmoyere@calendra.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/15377] New: GCJ does not use the good package for imported classes X-Bugzilla-Reason: CC X-SW-Source: 2004-q2/txt/msg00092.txt.bz2 List-Id: I use GCJ to compile .java files to .class files. On the command line, I use the @ option to make gcj compile several classes at a time. gcj seems to have a bug in the way it resolves the complete class name of an imported class, and so throws compile errors for valid code. In my example, I have several classes called AbstractAction. One comming from javax.swing and another one I have written. The class MoveUpMultipleDataAction extends the javax.swing.AbstractAction and in its source file, I use a "import javax.swing.*" instead of writing a complete class name. When I compile MoveUpMultipleDataAction with gcj (and the @ option), gcj throws a compile error: for gcj MoveUpMultipleDataAction extends my AbstractAction class instead of the javax.swing one. If I remove the first class in the file that contains the java source files to compile, gcj works fine (even if the removed class has nothing to do the classes causing the compilation error) You will find all the sources in the attached file. I tryed to make the example as small as possible but the bug is difficult to reproduce at a very small scale. The example uses the following command line: gcj -d classes -classpath /ant.jar -g1 -C @javafiles -- Summary: GCJ does not use the good package for imported classes Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nmoyere at calendra dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC build triplet: 3.3.2 GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15377