This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj and '-Wall'?



It seems that '-Wall' is not supported with gcj.
Is this correct? I was hoping to use gcj to let me
know about any unused variables, and any other possible
bugs..

For that matter, does anyone know any other java compiler which has -Wall
like feature? 

bash$ cat hello.c 
#include<stdio.h>
main () {
        char ch;
        printf("hello\n");
}
bash$ gcc -Wall hello.c 
hello.c:2: warning: return-type defaults to `int'
hello.c: In function `main':
hello.c:3: warning: unused variable `ch'
hello.c:5: warning: control reaches end of non-void function
bash$ cat HelloWorld.java 
public class HelloWorld {
        public static void main(String [] args) {
                char ch;
                System.out.println("Hello");
        }
}
bash$ gcj -Wall --main=HelloWorld HelloWorld.java 
bash$



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]