Bug 20978 - Failure to detect unhandled exception
Summary: Failure to detect unhandled exception
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on: 28067
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-12 20:23 UTC by Bryce McKinlay
Modified: 2007-01-09 20:47 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-04-12 20:26:11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce McKinlay 2005-04-12 20:23:05 UTC
In some cases GCJ fails to detect unhandled exceptions. In the code below, the
method x() is invalid because FileChannel.close() can throw an IOException. GCJ
should report an error stating that the exception must be caught or declared to
be thrown.

import java.nio.channels.*;

public class FCIO
{
  FileChannel fc;
  
  public void x()
  {
    fc.close();
  }
}
Comment 1 Andrew Pinski 2005-04-12 20:26:11 UTC
Confirmed, there might be another bug like this somewhere.
Comment 2 Tom Tromey 2007-01-09 20:47:32 UTC
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.