Summary: | invalid "may not have been initialized" error | ||
---|---|---|---|
Product: | gcc | Reporter: | Jerry Haltom <wasabi> |
Component: | java | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, java-prs |
Priority: | P2 | Keywords: | diagnostic, rejects-valid |
Version: | 4.0.0 | ||
Target Milestone: | 4.3.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-05-01 02:37:39 | |
Bug Depends on: | 28067 | ||
Bug Blocks: |
Description
Jerry Haltom
2005-01-28 19:21:52 UTC
Oh yes, of course: runtime.jar: [mkdir] Created dir: /tmp/ram/eclipse-3.0.1/source-tree/plugins/org.eclipse.core.runtime/temp.folder/runtime.jar.bin [javac] Compiling 158 source files to /tmp/ram/eclipse-3.0.1/source-tree/plugins/org.eclipse.core.runtime/temp.folder/runtime.jar.bin [javac] /tmp/ram/eclipse-3.0.1/source-tree/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/JobManager.java: In class `org.eclipse.core.internal.jobs.JobManager': [javac] /tmp/ram/eclipse-3.0.1/source-tree/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/JobManager.java: In method `org.eclipse.core.internal.jobs.JobManager.join(org.eclipse.core.internal.jobs.InternalJob)': [javac] /tmp/ram/eclipse-3.0.1/source-tree/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/JobManager.java:548: error: Variable `listener' may not have been initialized. [javac] }; [javac] ^ [javac] 1 error Confirmed, reduced to: class a1 { public int f(){return 1;} } class t { Object f; void g(a1 a) {} void f() { final a1 a; a = new a1 () { public int f(){return 0;}}; g(a); } } Related to bug 16839. The problem might be the same problem after all because final are collected for anonymous inner classes. Yes, the underlying problem is the same as with bug 16839. gcj captures all 'final' local variables in an anonymous class. This is incorrect -- it should only capture those which are actually used. All gcj front end bugs have been fixed by the gcj-eclipse branch merge. I'm mass-closing the affected PRs. If you believe one of these was closed in error, please reopen it with a note explaining why. Thanks. |