OSDN Git Service

Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Apr 2000 22:14:53 +0000 (22:14 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Apr 2000 22:14:53 +0000 (22:14 +0000)
        * 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)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33422 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/parse.c
gcc/java/parse.y

index 4cbade6..dac48d9 100644 (file)
@@ -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.
index e3e2a5f..92598a5 100644 (file)
@@ -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
index d2c5b12..13cbab8 100644 (file)
@@ -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