User account creation filtered due to spam.

Bug 12788 - bad dependencies for inner classes
Summary: bad dependencies for inner classes
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Blocks: 18131
  Show dependency treegraph
Reported: 2003-10-27 14:12 UTC by Thomas Neumann
Modified: 2016-09-30 22:48 UTC (History)
2 users (show)

See Also:
Host: i386-mingw32msvc
Known to work:
Known to fail:
Last reconfirmed: 2005-07-23 05:24:48


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Neumann 2003-10-27 14:12:05 UTC
When using gcj to produce dependencies (-MMD) for Java code with inner classes, 
it adds the source file _and_ the .class file of the inner class. While this is 
technically correct, it should not be done as it creates cyclic dependencies.

E.g. given the two files class A { public interface AA {} B.BB b; } class B { public interface BB { } A.AA a; }

compiling these files with (has to be compiled twice):
gcj -MMD -C
gcj -MMD -C
gcj -MMD -C
gcj -MMD -C

results in the dependencies
./A$$AA.class ./A.class: ./ ./B$$BB.class
./B$$BB.class ./B.class: ./ ./A$$AA.class

This creates a cyclic dependency, which makes the dependencies more or less 
worthless. The nicer behaviour would be to ommit the .class files in the 
dependency lists, as they are already implied by their .java files (of course 
this is only possible if the .java files are actually available).
Comment 1 Andrew Pinski 2003-10-27 17:13:58 UTC
I can confirm this on the mainline (20031018).
Comment 2 Andrew Pinski 2016-09-30 22:48:33 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.