public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1127: gcj accepts invalid code where an exception must be caught/thrown
@ 2000-12-20 12:07 bryce
  0 siblings, 0 replies; only message in thread
From: bryce @ 2000-12-20 12:07 UTC (permalink / raw)
  To: java-bugs

>Number:         1127
>Category:       java
>Synopsis:       gcj accepts invalid code where an exception must be caught/thrown
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:06:21 PST 2000
>Closed-Date:    Thu Jul 22 11:05:30 PDT 1999
>Last-Modified:  Thu Jul 22 11:05:30 PDT 1999
>Originator:     Bryce McKinlay
>Release:        gcc version gcc-2.96 19990630 (experimental)
>Organization:
>Environment:
Any
>Description:
This is a source parser bug.

gcj can fail to report an "exception must be caught or 
thrown" error depending on how the method that throws the
exception is invoked.
>How-To-Repeat:
The following code demonstrates the problem:

public class MustCatchOrThrow
{
  public static void main(String args[])
  {    
    new MustCatchOrThrow().test();    
  }
    
  private void test() throws Exception
  {
    throw new Exception();
  }
}

If the test method is invoked as follows, gcj correctly
reports an error:

MustCatchOrThrow m = new MustCatchOrThrow();
m.test(); 
>Fix:
http://egcs.cygnus.com/ml/gcc-patches/1999-07/msg00525.html
>Release-Note:
Libgcj's java/net should be updated in order to compile
with the patches compiler. See
http://sourceware.cygnus.com/ml/java-patches/1999-q3/msg00048.html
>Audit-Trail:

Formerly PR gcj/12

State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Tue Jul 20 14:09:36 1999
State-Changed-Why:
Temptative fix checked in egcs. Let me know how it works
for you.
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 22 11:05:30 1999
State-Changed-Why:
Bryce's and Alex's tests reported the patch was adequate.
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:07 java/1127: gcj accepts invalid code where an exception must be caught/thrown bryce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).