public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1134: Incompatible inherited throws clause are not catched by gcj
@ 2000-12-20 12:07 joerg.brunsmann
  0 siblings, 0 replies; only message in thread
From: joerg.brunsmann @ 2000-12-20 12:07 UTC (permalink / raw)
  To: java-gnats

>Number:         1134
>Category:       java
>Synopsis:       Incompatible inherited throws clause are not catched by gcj
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:06:27 PST 2000
>Closed-Date:    Mon Mar 06 01:32:54 PST 2000
>Last-Modified:  Mon Mar  6 01:40:00 PST 2000
>Originator:     joerg.brunsmann@fernuni-hagen.de
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
Incompatible inherited throws clause are not catched by gcj
>How-To-Repeat:
public class E1 extends Exception {}

public class E2 extends Exception {}

public class E3 extends E2 {}

abstract class X {

  abstract void f() throws E1, E3;
}

class Y extends X {

  void f() throws E1, E2 {
  }
}


compile these with

$ javac *.java

Y.java:4: The method void f() declared in class Y cannot override the method of the same signature declared in class X.  Their throws clauses are incompatible.
  void f() throws E1, E2 {
       ^
1 error

gcj doesn't spit out an error
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/126


From: Bryce McKinlay <bryce@albatross.co.nz>
To: java-gnats@sourceware.cygnus.com, apbianco@cygnus.com,
        joerg.brunsmann@fernuni-hagen.de
Cc:  
Subject: Re: gcj/126
Date: Mon, 06 Mar 2000 21:54:01 +1300

 Hi Joerg,
 
 I believe this PR has been fixed. Building your test case with the
 latest compiler (20000303), I get:
 
 Y.java:3: Invalid checked exception class `E2' in `throws' clause. The
 exception must be a subclass of an exception thrown by `f()' from class
 `X'.
                void f() throws E1, E2 {
                     ^
 1 error
 
 Do you agree?
 
 regards
 
   [ bryce ]
 
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=126&database=java
 
 
 

From: Joerg Brunsmann <joerg.brunsmann@FernUni-Hagen.de>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: java-gnats@sourceware.cygnus.com, apbianco@cygnus.com
Subject: Re: gcj/126
Date: Mon, 06 Mar 2000 10:20:59 +0100

 Hi Bryce,
 
 > I believe this PR has been fixed. Building your test case with the
 > latest compiler (20000303), I get:
 > =
 
 > Y.java:3: Invalid checked exception class `E2' in `throws' clause. The
 > exception must be a subclass of an exception thrown by `f()' from class
 > `X'.
 >                void f() throws E1, E2 {
 >                     ^
 > 1 error
 > =
 
 > Do you agree?
 
 I just checked it with gcc version 2.96 20000221 and it spits out
 an error message, so I agree that this PR has been fixed. Thanks.
 
 J=F6rg
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Mon Mar  6 01:32:54 2000
State-Changed-Why:
    Bug appears to be fixed in recent cvs compilers. Joerg has 
    verified this.

From: bryce@albatross.co.nz
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com,
  joerg.brunsmann@fernuni-hagen.de
Cc:  
Subject: Re: gcj/126
Date: 6 Mar 2000 09:32:54 -0000

 Synopsis: Incompatible inherited throws clause are not catched by gcj
 
 State-Changed-From-To: open->closed
 State-Changed-By: bryce
 State-Changed-When: Mon Mar  6 01:32:54 2000
 State-Changed-Why:
     Bug appears to be fixed in recent cvs compilers. Joerg has 
     verified this.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=126&database=java
>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/1134: Incompatible inherited throws clause are not catched by gcj joerg.brunsmann

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).