From 3f2b0698ca2600a813b37f1513c79c84b227b8cc Mon Sep 17 00:00:00 2001 From: fitzsim Date: Tue, 30 Aug 2005 16:19:15 +0000 Subject: 2005-08-29 Thomas Fitzsimmons PR libgcj/23549 * gij.cc (main): Don't expect arguments to -enableassertions, -ea, -disableassertions and -da. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103642 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/gij.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'libjava/gij.cc') diff --git a/libjava/gij.cc b/libjava/gij.cc index 60d5b34817d..7c8d8b4222b 100644 --- a/libjava/gij.cc +++ b/libjava/gij.cc @@ -155,20 +155,16 @@ main (int argc, char const** argv) // 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") -- cgit v1.2.1