This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
java/8433: Static initializers must be able to complete normally
- From: ebb9 at email dot byu dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 3 Nov 2002 01:45:55 -0000
- Subject: java/8433: Static initializers must be able to complete normally
- Reply-to: ebb9 at email dot byu dot edu
>Number: 8433
>Category: java
>Synopsis: Static initializers must be able to complete normally
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Sat Nov 02 17:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: ebb9@email.byu.edu
>Release: gcj (GCC) 3.2 20020818 (prerelease)
>Organization:
>Environment:
Configured with: /netrel/src/gcc-3.2-1/configure --enable-languages=c,c++,f77,ja
va --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --with
out-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-ve
rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc
-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr
--sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecd
ir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)
>Description:
Java forbids static initializers from not being able to complete normally. These two classes should both cause a compile-time error, but gcj accepts them:
class Foo
{
static
{
throw new NullPointerException("nope");
}
}
class Other
{
static
{
while (true);
}
}
>How-To-Repeat:
Compile the two example classes. It should give two compile errors.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: