This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: -Wall -vs- -Wunused for gcj
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Subject: Patch: -Wall -vs- -Wunused for gcj
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 27 Feb 2000 00:49:26 -0700
- Reply-To: tromey at cygnus dot com
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;
}