diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index f1a1ee1c0fbb..664cd32cc442 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2010-09-27 Andrew Haley + + PR java/45773 + * jvgenmain.c (main): Fix arg processing. + 2010-09-22 Joseph Myers * jvspec.c (lang_specific_driver): Handle OPT__help instead of diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c index 91fa81ce4d45..a6788029f9e3 100644 --- a/gcc/java/jvgenmain.c +++ b/gcc/java/jvgenmain.c @@ -123,8 +123,12 @@ main (int argc, char **argv) for (i = 1; i < last_arg; ++i) { const char *p; + + if (strcmp (argv[i], "-D") == 0) + continue; + fprintf (stream, " \""); - for (p = &argv[i][2]; *p; ++p) + for (p = argv[i]; *p; ++p) { if (! ISPRINT (*p)) fprintf (stream, "\\%o", *p);