This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: fix PR23549


Hi,

gij was expecting arguments to the -enableassertions and
-disableassertions options, which shouldn't take arguments.  I committed
this fix to CVS HEAD.

Tom

2005-08-29  Thomas Fitzsimmons  <fitzsim@redhat.com>

	PR libgcj/23549
	* gij.cc (main): Don't expect arguments to -enableassertions, -ea,
	-disableassertions and -da.

Index: gij.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gij.cc,v
retrieving revision 1.28
diff -u -r1.28 gij.cc
--- gij.cc	13 May 2005 01:02:34 -0000	1.28
+++ gij.cc	30 Aug 2005 16:18:37 -0000
@@ -155,20 +155,16 @@
       // Ignore 32/64-bit JIT options
       else if (! strcmp (arg, "-d32") || ! strcmp (arg, "-d64"))
         continue;
-      else if (! strcmp (arg, "-enableassertions") || ! strcmp (arg, "-ea"))
+      else if (! strncmp (arg, "-enableassertions", sizeof ("-enableassertions") - 1)
+               || ! strncmp (arg, "-ea", sizeof ("-ea") - 1))
         {
-          if (i >= argc - 1)
-            goto no_arg;
           // FIXME: hook up assertion support
-          ++i;
           continue;
         }
-      else if (! strcmp (arg, "-disableassertions") || ! strcmp (arg, "-da"))
+      else if (! strncmp (arg, "-disableassertions", sizeof ("-disableassertions") - 1)
+               || ! strncmp (arg, "-da", sizeof ("-da") - 1))
         {
-          if (i >= argc - 1)
-            goto no_arg;
-          // FIXME
-          ++i;
+          // FIXME: hook up assertion support
           continue;
         }
       else if (! strcmp (arg, "-enablesystemassertions")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]