This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Convert java/ to use opts.c
- From: Tom Tromey <tromey at redhat dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, GCC libjava patches <java-patches at gcc dot gnu dot org>
- Date: 10 Jun 2003 16:33:52 -0600
- Subject: Re: Convert java/ to use opts.c
- References: <20030608153218.GE28612@daikokuya.co.uk>
- Reply-to: tromey at redhat dot com
>>>>> "Neil" == Neil Booth <neil@daikokuya.co.uk> writes:
Neil> This patch gets java/ to use opts.c, and also contains some simple
Neil> constification that entails.
While building Classpath I now see this:
/home/tromey/gnu/Trunk/install/bin/gcj --bootclasspath '' -classpath ../../classpath:../../classpath/external/jaxp/source:../vm/current:.: -C -d . @classes
jc1: error: missing argument to "-fbootclasspath="
It does make sense to pass an empty argument to --bootclasspath.
The appended fixes it. It also cleans up the indentation a bit. Ok?
Tom
Index: gcc/java/ChangeLog
from Tom Tromey <tromey@redhat.com>
* lang.c (java_handle_option): OPT_fbootclasspath_ can take an
empty argument.
Index: gcc/java/lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lang.c,v
retrieving revision 1.128
diff -u -r1.128 lang.c
--- gcc/java/lang.c 10 Jun 2003 16:43:39 -0000 1.128
+++ gcc/java/lang.c 10 Jun 2003 22:38:43 -0000
@@ -274,16 +274,17 @@
if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
{
- /* These can take an emtpy argument. */
+ /* These can take an empty argument. */
if (code == OPT_fassume_compiled_
|| code == OPT_fclasspath_
- || code == OPT_fCLASSPATH_)
+ || code == OPT_fCLASSPATH_
+ || code == OPT_fbootclasspath_)
arg = "";
else
- {
+ {
error ("missing argument to \"-%s\"", option->opt_text);
- return 1;
- }
+ return 1;
+ }
}
switch (code)
@@ -384,7 +385,7 @@
case OPT_fdump_:
if (!dump_switch_p (option->opt_text + strlen ("f")))
- return 0;
+ return 0;
break;
case OPT_femit_class_file: