parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when negative *befor...
authorAlexandre Petit-Bianco <apbianco@cygnus.com>
Tue, 28 Mar 2000 22:35:46 +0000 (22:35 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Tue, 28 Mar 2000 22:35:46 +0000 (14:35 -0800)
2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>

* parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
when negative *before* using it as an array index.
* ChangeLog: Fixed typo.

(Fixes the following bogus patch:
 http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00937.html)

From-SVN: r32793

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

index c6d72ce..0ab7edb 100644 (file)
@@ -1,12 +1,18 @@
 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
        * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
+       when negative *before* using it as an array index.
+       * ChangeLog: Fixed typo.
+
+2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
+
+       * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
        to 0 when it reaches -1.
 
 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
        * jcf-parse.c (get_constant): Properly cast `num' during the
-       invocation of `add_double call'.
+       invocation of `add_double'.
        * jcf-write.c (push_long_const): Properly cast `lo' before
        comparing it to short bounds.
        * parse-scan.y (interface_declaration:): Rule re-arrange so that
index 4e2f024..649c181 100644 (file)
@@ -2495,9 +2495,9 @@ pop_class_context ()
         && inner_qualifier [inner_qualifier_length-1] != '$')
     ;
   inner_qualifier = xrealloc (inner_qualifier, inner_qualifier_length+1);
-  inner_qualifier [inner_qualifier_length] = '\0';
   if (inner_qualifier_length == -1)
     inner_qualifier_length = 0;
+  inner_qualifier [inner_qualifier_length] = '\0';
 }
 
 /* Actions defined here */
index 73a46ab..f4d10b8 100644 (file)
@@ -1144,9 +1144,9 @@ pop_class_context ()
         && inner_qualifier [inner_qualifier_length-1] != '$')
     ;
   inner_qualifier = xrealloc (inner_qualifier, inner_qualifier_length+1);
-  inner_qualifier [inner_qualifier_length] = '\0';
   if (inner_qualifier_length == -1)
     inner_qualifier_length = 0;
+  inner_qualifier [inner_qualifier_length] = '\0';
 }
 
 /* Actions defined here */