Re: ecj and -warn:unused
On Tue, 2006-02-28 at 20:41 +0100, Roman Kennke wrote: > Am Dienstag, den 28.02.2006, 14:28 -0500 schrieb Stuart Ballard: > > I figured out the reason why at least one of the compilers on my > > system was failing to build classpath. The version of ecj I have (from > > Ubuntu Breezy) doesn't appear to understand the "unused" parameter to > > the "-warn" flag, which lib/Makefile passes to it. > > ACK. I would like to see this fixed also. The attached quick and dirty test would detect support for the unused warning flag. But I only have an ecj available that does have that flag. So please test (re-autogen, re-configure, etc) with an ecj that doesn't support it. Cheers, Mark Index: m4/acinclude.m4 === RCS file: /cvsroot/classpath/classpath/m4/acinclude.m4,v retrieving revision 1.10 diff -u -r1.10 acinclude.m4 --- m4/acinclude.m4 21 Jan 2006 20:57:09 - 1.10 +++ m4/acinclude.m4 1 Mar 2006 08:59:54 - @@ -459,4 +459,11 @@ else AC_PATH_PROG(ECJ, "ecj") fi + if test "x$ECJ" != "x"; then +if test -n "`$ECJ -warn:unused 2>&1 | grep "invalid warning: unused"`"; then + ECJWARNINGS='-warn:-deprecation,serial' +else + ECJWARNINGS='-warn:-deprecation,serial,unused' +fi +AC_SUBST(ECJWARNINGS) ]) Index: lib/Makefile.am === RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v retrieving revision 1.111 diff -u -r1.111 Makefile.am --- lib/Makefile.am 13 Feb 2006 19:13:16 - 1.111 +++ lib/Makefile.am 1 Mar 2006 08:59:54 - @@ -29,7 +29,7 @@ JAVAC = $(GCJX) -g -encoding UTF-8 -classpath .:$(USER_CLASSLIB) -d . @classes else if FOUND_ECJ -JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 -warn:-deprecation,serial,unused -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes +JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 $(ECJWARNINGS) -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes endif # FOUND_ECJ endif # FOUND_GCJX endif # FOUND_KJC signature.asc Description: This is a digitally signed message part
Re: ecj and -warn:unused
On Tue, 2006-02-28 at 14:36 -0500, Stuart Ballard wrote: > On 2/28/06, Stuart Ballard <[EMAIL PROTECTED]> wrote: > > (I do get an awful lot of "unused" > > warnings but the build is proceeding) > > ... and it died with an internal compiler error, so perhaps it's not > worth detecting the "unused" warning issue after all. Should this > version be able to compile Classpath? O, that is annoying. I am using Eclipse Java Compiler v_585_R31x, 3.1.2 release (Debian package eclipse-ecj version 3.1.2-1). Which also seems to know about the unused warning flag disabling. > How about jikes 1.22 or gcj 4.02? Yes. Both are used on builder for bootstrapping cvs trunk: Jikes Compiler - Version 1.22 - 3 October 2004 (Debian package version 1:1.22-2) gcj (GCC) 4.0.2 (Compiled and installed from official release tar.gz) Cheers, Mark signature.asc Description: This is a digitally signed message part
Re: ecj and -warn:unused
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes: Andrew> Of course, there's always the option of just fixing the lines Andrew> that cause the unused errors... ;) :-) FWIW some of our warnings aren't easily fixable since they come from stuff in external/, which we don't want to modify if possible. Maybe there's a way to disable warnings by package or something like that. Tom
Re: ecj and -warn:unused
On Tue, 2006-02-28 at 14:36 -0500, Stuart Ballard wrote: > On 2/28/06, Stuart Ballard <[EMAIL PROTECTED]> wrote: > > (I do get an awful lot of "unused" > > warnings but the build is proceeding) > > ... and it died with an internal compiler error, so perhaps it's not > worth detecting the "unused" warning issue after all. Should this > version be able to compile Classpath? > > How about jikes 1.22 or gcj 4.02? > > Stuart. > > -- > http://sab39.dev.netreach.com/ > > Of course, there's always the option of just fixing the lines that cause the unused errors... ;) -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } signature.asc Description: This is a digitally signed message part
Re: ecj and -warn:unused
Hi there, Am Dienstag, den 28.02.2006, 14:28 -0500 schrieb Stuart Ballard: > I figured out the reason why at least one of the compilers on my > system was failing to build classpath. The version of ecj I have (from > Ubuntu Breezy) doesn't appear to understand the "unused" parameter to > the "-warn" flag, which lib/Makefile passes to it. ACK. I would like to see this fixed also. /Roman signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: ecj and -warn:unused
On 2/28/06, Stuart Ballard <[EMAIL PROTECTED]> wrote: > (I do get an awful lot of "unused" > warnings but the build is proceeding) ... and it died with an internal compiler error, so perhaps it's not worth detecting the "unused" warning issue after all. Should this version be able to compile Classpath? How about jikes 1.22 or gcj 4.02? Stuart. -- http://sab39.dev.netreach.com/