This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcj: disabling synchronization




On Sat, 29 Jan 2000, 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]