aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-04-25 22:14:53 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-04-25 15:14:53 -0700
commit932207025a862cbea7b863894615efe64cc8d471 (patch)
tree2ef08d926f719485ee8cbbec2915d83d65403f1d /gcc/java
parentb36f4ed35411cadef7f3b17cab4089be7246707a (diff)
downloadgcc-932207025a862cbea7b863894615efe64cc8d471.zip
gcc-932207025a862cbea7b863894615efe64cc8d471.tar.gz
gcc-932207025a862cbea7b863894615efe64cc8d471.tar.bz2
re GNATS gcj/181 (gcj crashes on inner classes/interfaces definition/usage.)
Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_class_declaration): Reset the interface number counter. (This fixes the Java PR #181: http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00207.html) From-SVN: r33422
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/parse.c7
-rw-r--r--gcc/java/parse.y7
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 4cbade6..dac48d9 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (end_class_declaration): Reset the interface number
+ counter.
+
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (source_start_java_method): Deleted unecessary code.
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index e3e2a5f..92598a5 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -6567,6 +6567,13 @@ end_class_declaration (resume)
POP_CPC ();
if (resume && no_error_occured)
java_parser_context_resume ();
+
+ /* We're ending a class declaration, this is a good time to reset
+ the interface cout. Note that might have been already done in
+ create_interface, but if at that time an inner class was being
+ dealt with, the interface count was reset in a context created
+ for the sake of handling inner classes declaration. */
+ ctxp->interface_number = 0;
}
static void
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index d2c5b12..13cbab8 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -3869,6 +3869,13 @@ end_class_declaration (resume)
POP_CPC ();
if (resume && no_error_occured)
java_parser_context_resume ();
+
+ /* We're ending a class declaration, this is a good time to reset
+ the interface cout. Note that might have been already done in
+ create_interface, but if at that time an inner class was being
+ dealt with, the interface count was reset in a context created
+ for the sake of handling inner classes declaration. */
+ ctxp->interface_number = 0;
}
static void