another compiler better than gcj ?

Martin Kahlert martin.kahlert@infineon.com
Sun Oct 21 23:49:00 GMT 2001


On Sun, Oct 21, 2001 at 06:56:16PM +1300, Bryce McKinlay wrote:
> It [Manta] seemed to have no problem compiling any of the java source I threw at 
> it, though it did seem to have an annoying habit of trying to parse 
> random .java files from the current directory/classpath, and error 
> messages seemed non-intuitive.

Hi Bryce,
i threw some of my old gcj problem code selection at it:
The first one gave a wrong answer:
class C {}
class D extends C implements I {}
interface I {}
interface J extends I {}
public class Class_1
{
 static void printIsAssignableFrom(Class a, Class b, boolean c)
 {
 // The field 'c' can be viewed to see the expected value.
 System.out.print(a.isAssignableFrom(b));
 System.out.print(" ");
 System.out.println(c);
 }
 public static void main (String arg[])
 {
 printIsAssignableFrom(I.class, J.class, true);
 }
$ ../Manta/build/mantac -o a Class_1.java
$ ./a
false true
The second error comes from that code:
public class priv
{
 private class InnerPriv
 {
 private InnerPriv() { }
 }
 public void f()
 {
 InnerPriv ip = new InnerPriv();
 }
 public static void main(String[] args)
 {
 System.out.println( "Hello World" );
 }
}
$ ../Manta/build/mantac -o a priv.java
/sw/local_l/kahlert/Hello/priv.java:10: calling private constructor \
 in 'new InnerPriv'
...skipping link phase because of previous errors.
Since this is used in my big app, i did not try to compile that.
Otherwise it looks quite promising.
Regards
Martin.
-- 
The early bird catches the worm. If you want something else for 
breakfast, get up later.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /