re PR java/45773 (gcj fails to compile java)
authorAndrew Haley <aph@redhat.com>
Tue, 28 Sep 2010 09:54:27 +0000 (09:54 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Tue, 28 Sep 2010 09:54:27 +0000 (09:54 +0000)
2010-09-27  Andrew Haley  <aph@redhat.com>

        PR java/45773
        * jvgenmain.c (main): Fix arg processing.

From-SVN: r164679

gcc/java/ChangeLog
gcc/java/jvgenmain.c

index f1a1ee1c0fbb27f723ec1d335769e9fd00221103..664cd32cc4425b6e9e3ca13d7b9d27fafa4c8f39 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-27  Andrew Haley  <aph@redhat.com>
+
+       PR java/45773
+       * jvgenmain.c (main): Fix arg processing.
+
 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
 
        * jvspec.c (lang_specific_driver): Handle OPT__help instead of
index 91fa81ce4d45d8895788a7243731bf35699460ae..a6788029f9e3bf1c3ebcbf310d3c85e2118cb49f 100644 (file)
@@ -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);