gcj: disabling synchronization
Jeff Sturm
jsturm@sigma6.com
Sat Apr 1 00:00:00 GMT 2000
On 2000年1月29日, Alexandre Petit-Bianco wrote:
> If you read java-tree.def, you'll find that the SYNCHRONIZED_EXPR
> contains two things: first the expression on which we synchronize and
> then the synchronized block. I thing something hereafter might work.
Thanks. It almost works now. Sometimes I get "Unreachable statement"
however:
[jsturm@cc42593-a tmp]$ cat T.java
public class T {
public int t() {
int n;
synchronized (this) {
n = 1;
}
return n;
}
}
[jsturm@cc42593-a tmp]$ gcj -c -fno-monitors T.java
T.java: In class `T':
T.java: In method `t()':
T.java:7: Unreachable statement.
return n;
^
1 error
I'll see if I can figure out what's going on in java_complete_lhs.
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list