This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
gcj and '-Wall'?
- To: java-discuss at sourceware dot cygnus dot com
- Subject: gcj and '-Wall'?
- From: ADAM Sulmicki <adam at cfar dot umd dot edu>
- Date: Sat, 26 Feb 2000 22:10:41 -0500 (EST)
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$