This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: signature parsing fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 12 Feb 2005 20:22:26 -0700
- Subject: [gcjx] Patch: FYI: signature parsing fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes a bug that occurred when parsing type signatures.
We wouldn't notice a ';' in the signature and then would complain
about the signature being too short.
Tom
#
# patch "gcc/gcjx/ChangeLog"
# from [3a67adeac606215841ee9d41c38cf184961cab46]
# to [61765797f8ac7b4456ac5bc6848d6905afd330b4]
#
# patch "gcc/gcjx/bytecode/signature.cc"
# from [8d2154fe79354eabd2ffd29913af53b7e5d990d9]
# to [5b11cd12850d2e2bc942144aff9b2f8afc93f064]
#
--- gcc/gcjx/ChangeLog
+++ gcc/gcjx/ChangeLog
@@ -1,5 +1,8 @@
2005-02-04 Tom Tromey <tromey@redhat.com>
+ * bytecode/signature.cc (parse_ref_type): End inner loop when ';'
+ seen.
+
* bytecode/locals.cc (request): Minor rearrangement.
(remove): Pop 'scope'.
* bytecode/generate.cc (visit_variable_stmt): Removed old
--- gcc/gcjx/bytecode/signature.cc
+++ gcc/gcjx/bytecode/signature.cc
@@ -1,6 +1,6 @@
// Signature parsing.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -182,9 +182,9 @@
std::list<std::string> ids;
std::string::const_iterator start = it;
- while (it != done && *it != '.')
+ while (it != done && *it != '.' && *it != ';')
++it;
-
+
result = new model_forwarding_inner (where,
split (std::string (start, it),
'.'),