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]

"catch ()" misdiagnosed


If I run "gcj -c X.java" with this source file:

class X {
   public void test() {
      try { }
      catch () { }
   }
}

I get:

X.java:4: ')' expected.
      catch () { }
             ^
gcj: Internal compiler error: program jc1 got fatal signal 11

Now "')' expected" is wrong since it's just found a closing bracket.
It should be expecting a Throwable argument.  And we shouldn't be
getting an internal compiler error either, should we?

I'm using gcc 2.95.2 with Bryce McKinlay's patch applied (got it from
http://waitaki.otago.ac.nz/~bryce/gcj/), and the latest libgcj from
CVS.

Cheers,
Olly

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