This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Patch: -Wall -vs- -Wunused for gcj


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;
     }
 

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