summaryrefslogtreecommitdiffstats
path: root/gcc/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-12 18:57:52 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-12 18:57:52 +0000
commit14ff6cc5349e8e523701062d94b5f7063a6e171c (patch)
treef6391197f6fa1bfe79419915b471b09e90f7f4fc /gcc/java
parent514f4771d5265636e80614bad6a8babadc85c66b (diff)
downloadppe42-gcc-14ff6cc5349e8e523701062d94b5f7063a6e171c.tar.gz
ppe42-gcc-14ff6cc5349e8e523701062d94b5f7063a6e171c.zip
Fix for PR gcj/356:
* gjavah.c (add_class_decl): Don't special-case inner classes. (add_namelet): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/gjavah.c28
2 files changed, 12 insertions, 22 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 99fa8543242..1f0229a9a3a 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2000-10-12 Tom Tromey <tromey@cygnus.com>
+
+ Fix for PR gcj/356:
+ * gjavah.c (add_class_decl): Don't special-case inner classes.
+ (add_namelet): Likewise.
+
2000-10-10 Tom Tromey <tromey@cygnus.com>
* lex.c (java_new_lexer): Initialize out_first and out_last
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index a25788a4361..4cf0e98257f 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -1463,7 +1463,7 @@ add_namelet (name, name_limit, parent)
return;
}
- for (p = name; p < name_limit && *p != '/' && *p != '$'; ++p)
+ for (p = name; p < name_limit && *p != '/'; ++p)
;
/* Search for this name beneath the PARENT node. */
@@ -1484,7 +1484,7 @@ add_namelet (name, name_limit, parent)
n->name = xmalloc (p - name + 1);
strncpy (n->name, name, p - name);
n->name[p - name] = '\0';
- n->is_class = (p == name_limit || *p == '$');
+ n->is_class = (p == name_limit);
n->subnamelets = NULL;
n->next = parent->subnamelets;
parent->subnamelets = n;
@@ -1492,7 +1492,7 @@ add_namelet (name, name_limit, parent)
/* We recurse if there is more text, and if the trailing piece does
not represent an inner class. */
- if (p < name_limit && *p != '$')
+ if (p < name_limit)
add_namelet (p + 1, name_limit, n);
}
@@ -1568,7 +1568,7 @@ add_class_decl (out, jcf, signature)
for (i = 0; i < len; ++i)
{
- int start, saw_dollar;
+ int start;
/* If we see an array, then we include the array header. */
if (s[i] == '[')
@@ -1582,26 +1582,10 @@ add_class_decl (out, jcf, signature)
if (s[i] != 'L')
continue;
- saw_dollar = 0;
for (start = ++i; i < len && s[i] != ';'; ++i)
- {
- if (! saw_dollar && s[i] == '$' && out)
- {
- saw_dollar = 1;
- /* If this class represents an inner class, then
- generate a `#include' for the outer class. However,
- don't generate the include if the outer class is the
- class we are processing. */
- if (i - start < tlen || strncmp (&s[start], tname, i - start))
- print_include (out, &s[start], i - start);
- break;
- }
- }
+ ;
- /* If we saw an inner class, then the generated #include will
- declare the class. So in this case we needn't bother. */
- if (! saw_dollar)
- add_namelet (&s[start], &s[i], &root);
+ add_namelet (&s[start], &s[i], &root);
}
}
OpenPOWER on IntegriCloud