summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 21:30:10 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 21:30:10 +0000
commit5869bfd0a48cdd4326d8800b5a16416be8f79b64 (patch)
treef08721456d2c5ecd36ffa9f76c8a8ca641af4b46
parent92fccaaa535d5555bda8058c165fe3b2e0528c88 (diff)
downloadgcc-5869bfd0a48cdd4326d8800b5a16416be8f79b64.tar.gz
PR java/30607:
* jvspec.c (lang_specific_driver): Handle separate -I argument. * lang.opt (-I): Add 'Separate'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121311 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/jvspec.c14
-rw-r--r--gcc/java/lang.opt2
3 files changed, 19 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 1cd6c07857c..56a3e3ba4d6 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-29 Tom Tromey <tromey@redhat.com>
+
+ PR java/30607:
+ * jvspec.c (lang_specific_driver): Handle separate -I argument.
+ * lang.opt (-I): Add 'Separate'.
+
2007-01-29 Andrew Haley <aph@redhat.com>
* class.c (add_method_1): Mark fndecl as external unless we are
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index a26f4f68567..dce2c74c333 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -305,7 +305,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
else if (argv[i][1] == 'O')
saw_O = 1;
else if ((argv[i][2] == '\0'
- && strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
+ && strchr ("bBVDUoeTuIYmLiAI", argv[i][1]) != NULL)
|| strcmp (argv[i], "-Tdata") == 0
|| strcmp (argv[i], "-MT") == 0
|| strcmp (argv[i], "-MF") == 0)
@@ -518,7 +518,17 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
if (argv[i][1] == 'I')
{
- jcf_path_include_arg (&argv[i][2]);
+ const char *arg;
+ if (argv[i][2] == '\0')
+ {
+ gcc_assert (i + 1 < argc && (args[i + 1] & PARAM_ARG) != 0);
+ arg = argv[i + 1];
+ /* Drop the argument. */
+ ++i;
+ }
+ else
+ arg = &argv[i][2];
+ jcf_path_include_arg (arg);
--j;
continue;
}
diff --git a/gcc/java/lang.opt b/gcc/java/lang.opt
index 67852eeb3fa..a036ae09992 100644
--- a/gcc/java/lang.opt
+++ b/gcc/java/lang.opt
@@ -26,7 +26,7 @@ Language
Java
I
-Java Joined
+Java Joined Separate
; Documented for C
M