Patch: -Wall -vs- -Wunused for gcj

Tom Tromey tromey@cygnus.com
Sat Feb 26 23:49:00 GMT 2000


For gcj, -Wall does not imply -Wunused.  I think it should, because it
-Wall does imply -Wunused for the C front end.  Users expect this to
work the same way in both places.

Here is a patch to add this.  Ok?

2000-02-27  Tom Tromey  <tromey@cygnus.com>

	* lang.c (lang_decode_option): Enable -Wunused when -Wall given.


Tom

Index: lang.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/lang.c,v
retrieving revision 1.36
diff -u -r1.36 lang.c
--- lang.c	2000/02/26 19:56:23	1.36
+++ lang.c	2000/02/27 07:45:42
@@ -242,6 +251,9 @@
     {
       flag_wall = 1;
       flag_redundant = 1;
+      /* When -Wall given, enable -Wunused.  We do this because the C
+	 compiler does it, and people expect it.  */
+      warn_unused = 1;
       return 1;
     }
 


More information about the Gcc-patches mailing list