diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2002-03-02 09:58:05 -0800 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2002-03-02 09:58:05 -0800 |
commit | 4f647d52ec4534ff30bdb0729217ffd8ee899010 (patch) | |
tree | fb4b01019fd8d7005ba7344b0bc91da071cdedb9 /gcc/java/jcf-parse.c | |
parent | 86855e8c182e8ca97b9fa622b41bb697b9aee5da (diff) | |
download | gcc-4f647d52ec4534ff30bdb0729217ffd8ee899010.zip gcc-4f647d52ec4534ff30bdb0729217ffd8ee899010.tar.gz gcc-4f647d52ec4534ff30bdb0729217ffd8ee899010.tar.bz2 |
Fix for PR java/5758, java/5632:
2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
Fix for PR java/5758, java/5632:
* jcf-parse.c (load_class): Renamed local variable, consider `.' an
inner-class separator too.
* parse.y (do_resolve_class): New local `decl_result.'
Progressively build a name for what can have been loaded.
From-SVN: r50228
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index e85b578..484f79c 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -669,20 +669,20 @@ load_class (class_or_name, verbose) saved = name; while (1) { - char *dollar; + char *separator; if ((class_loaded = read_class (name))) break; /* We failed loading name. Now consider that we might be looking - for a inner class but it's only available in source for in - its enclosing context. */ - if ((dollar = strrchr (IDENTIFIER_POINTER (name), '$'))) + for a inner class. */ + if ((separator = strrchr (IDENTIFIER_POINTER (name), '$')) + || (separator = strrchr (IDENTIFIER_POINTER (name), '.'))) { - int c = *dollar; - *dollar = '\0'; + int c = *separator; + *separator = '\0'; name = get_identifier (IDENTIFIER_POINTER (name)); - *dollar = c; + *separator = c; } /* Otherwise, we failed, we bail. */ else |