compiler bug [message #32925] |
Tue, 20 May 2003 22:19  |
Eclipse User |
|
|
|
Originally posted by: yongw2.21cn.com
Platform: Eclipse/JDT 2.1.0, Windows 2000.
The following code is a simplified version of a machine-generated java code,
it is compiled successfully with JDT's internal Java compiler, but when
runs, it produces error message:
------
java.lang.VerifyError: (class: Bug, method: bug signature: (I)I) Illegal
default target in switch
Exception in thread "main"
------
However, I can compile and run it without any problem using Sun's JDK 1.4, I
think it is an internal bug, anyone who can help ?
----------------------bug code---------------
public class Bug
{
public static void main(String[] args)
{
int i = bug(123);
System.out.println(i);
}
public static int bug(int ppp)
{
switch(ppp) {
case 1:
case 2:
if (true) return(3);
break;
case 4:
break;
default :
break;
}
return(-1);
}
}
-------------------------------------
|
|
|
Re: compiler bug [message #32960 is a reply to message #32925] |
Wed, 21 May 2003 01:07   |
Eclipse User |
|
|
|
Originally posted by: yongw2.21cn.com
Sorry for the incomplete error message, the correct error message is :
----
java.lang.VerifyError: (class: jasn/parser/AsnParser, method: integerValue
signature: (Ljasn/parser/IntegerTypeInfo;)Ljasn/parser/BaseValueInfo;)
Illegal target of jump or branch
Exception in thread "main" make: Error code 1
----
> Platform: Eclipse/JDT 2.1.0, Windows 2000.
>
> The following code is a simplified version of a machine-generated java
code,
> it is compiled successfully with JDT's internal Java compiler, but when
> runs, it produces error message:
> ------
> java.lang.VerifyError: (class: Bug, method: bug signature: (I)I) Illegal
> default target in switch
> Exception in thread "main"
> ------
>
> However, I can compile and run it without any problem using Sun's JDK 1.4,
I
> think it is an internal bug, anyone who can help ?
>
> ----------------------bug code---------------
> public class Bug
> {
> public static void main(String[] args)
> {
> int i = bug(123);
> System.out.println(i);
> }
>
> public static int bug(int ppp)
> {
> switch(ppp) {
> case 1:
> case 2:
> if (true) return(3);
> break;
> case 4:
> break;
> default :
> break;
> }
>
> return(-1);
> }
> }
> -------------------------------------
>
>
|
|
|
Re: compiler bug [message #33467 is a reply to message #32960] |
Wed, 21 May 2003 09:23   |
Eclipse User |
|
|
|
It sounds like https://bugs.eclipse.org/bugs/show_bug.cgi?id=37621 which is
fixed in the latest 3.0 integration build and that will be in a next 2.1.1
maintenance build.
If you find that this is a different problem, do not hesitate to enter a bug
against JDT/Core.
Jerome
"Yong WANG" <yongw2@21cn.com> wrote in message
news:baf1j8$ljt$1@rogue.oti.com...
> Sorry for the incomplete error message, the correct error message is :
>
> ----
> java.lang.VerifyError: (class: jasn/parser/AsnParser, method: integerValue
> signature: (Ljasn/parser/IntegerTypeInfo;)Ljasn/parser/BaseValueInfo;)
> Illegal target of jump or branch
> Exception in thread "main" make: Error code 1
> ----
>
> > Platform: Eclipse/JDT 2.1.0, Windows 2000.
> >
> > The following code is a simplified version of a machine-generated java
> code,
> > it is compiled successfully with JDT's internal Java compiler, but when
> > runs, it produces error message:
> > ------
> > java.lang.VerifyError: (class: Bug, method: bug signature: (I)I) Illegal
> > default target in switch
> > Exception in thread "main"
> > ------
> >
> > However, I can compile and run it without any problem using Sun's JDK
1.4,
> I
> > think it is an internal bug, anyone who can help ?
> >
> > ----------------------bug code---------------
> > public class Bug
> > {
> > public static void main(String[] args)
> > {
> > int i = bug(123);
> > System.out.println(i);
> > }
> >
> > public static int bug(int ppp)
> > {
> > switch(ppp) {
> > case 1:
> > case 2:
> > if (true) return(3);
> > break;
> > case 4:
> > break;
> > default :
> > break;
> > }
> >
> > return(-1);
> > }
> > }
> > -------------------------------------
> >
> >
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03256 seconds