[Bug java/11600] New: CloneNotSupportedException not checked on super.clone()

gcc-bugzilla at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jul 20 01:09:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11600

           Summary: CloneNotSupportedException not checked on super.clone()
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: green at localhost dot localdomain
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

	gcj should complain about the "bad" class, below.  For instance,
ecj says:
1. Error in bad.java (at line 5)
        return super.clone ();
               ^^^^^^^^^^^^^^
Unhandled exception type CloneNotSupportedException

	gcj lets this bad code pass.

Environment:
System: Linux escape 2.4.20-13.9 #1 Mon May 12 10:55:37 EDT 2003 i686 i686 i386 GNU/Linux
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/home/green/tools/FSF/HEAD/i --enable-languages=c,c++,java

How-To-Repeat:
Try compiling this.  It should fail.

public class bad implements Cloneable
{
  public Object clone ()
    {
      return super.clone ();
    }
}



More information about the Gcc-bugs mailing list