This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Problems compiling Log4jME
- To: <java at gcc dot gnu dot org>
- Subject: Problems compiling Log4jME
- From: David Vrabel <dv207 at hermes dot cam dot ac dot uk>
- Date: Wed, 26 Sep 2001 15:55:50 +0100 (BST)
Hi,
I encountered two bugs trying to compile Log4jME (http://qos.ch/) with GCJ
3.0.
1. If an abstract class (AppenderSkeleton) implements an interface
(Appender) abstract methods not explictly declared (in AppenderSkeleton)
are not synthesized (as abstract methods).
eg. (not tested)
A.java:
interface A {
public void f();
}
B.java
public abtract class B {
public void g() {
f();
}
}
Won't compile as f() can't be found. But if B.java is
public abstract class B {
public void g() {
f();
}
public abstract void f();
}
it works fine.
2. This one's a bit freaky. Priority.java will cause gcj to eat all
memory and die.
Removing the code
...
switch(val) {
case ALL_INT: return ALL;
case DEBUG_INT: return DEBUG;
case INFO_INT: return INFO;
case WARN_INT: return WARN;
case ERROR_INT: return ERROR;
case FATAL_INT: return FATAL;
case OFF_INT: return OFF;
default: return defaultPriority;
}
...
and replacing it with
if( val == ALL_INT ) return ALL;
... etc.
Results in the file compiling fine.
Sorry about the lack of test case. But I'm leaving this job to go back to
university on Friday and I haven't got time to put together a test case.
David Vrabel