This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/18789] New: GCJ does not fail with omitted import
- From: "phil at mkdoc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2004 16:24:40 -0000
- Subject: [Bug java/18789] New: GCJ does not fail with omitted import
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If a dependent class in another package is not explicitly declared in an import
statement but the two classes are compiled together, GCJ does not fail.
-- OmittedImport.java
package com.example.bug;
public class OmittedImport {
public OmittedImport(NotImported notImported) {
// Empty
}
}
-- NotImported.java
package com.example.other;
public class NotImported {
// Empty
}
This is using a command lines like:
$ gcj -C -d /out /src/com/example/**/*.java
$ gcj -C -d /out /src/com/example/bug/OmittedImport.java
/src/com/example/other/NotImported.java
If the OmittedImport class is compiled alone, it does fail as one would expect.
The Sun SDK does not compile the OmittedImport class in any case.
--
Summary: GCJ does not fail with omitted import
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phil at mkdoc dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18789