]> git.saurik.com Git - bison.git/commitdiff
* src/gram.c (gram_free): Rename back as...
authorAkim Demaille <akim@epita.fr>
Sat, 22 Sep 2001 17:57:59 +0000 (17:57 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 22 Sep 2001 17:57:59 +0000 (17:57 +0000)
(dummy): this.
(output_token_translations): Free `token_translations'.
* src/symtab.c (free_symtab): Free the tag field.

ChangeLog
src/gram.c
src/output.c
src/reader.c
src/symtab.c

index e1d6e882dd443dbabc8a532051cc47df130cc035..3f24b1ffafd7cc6644df215cedd31297e0fd305e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-09-22  Akim Demaille  <akim@epita.fr>
+
+       * src/gram.c (gram_free): Rename back as...
+       (dummy): this.
+       (output_token_translations): Free `token_translations'.
+       * src/symtab.c (free_symtab): Free the tag field.
+
 2001-09-22  Akim Demaille  <akim@epita.fr>
 
        Remove `translations' as it is always set to true.
index 2cab907c50d6bdd94c024da8feee4705919d9a32..7016ab916352ee6b32e1e894b0dd12b3bf50d449 100644 (file)
@@ -52,10 +52,10 @@ int pure_parser;
 
 int error_token_number;
 
-/* Free all the memory associated to these pointers. */
+/* This is to avoid linker problems which occur on VMS when using GCC,
+   when the file in question contains data definitions only.  */
 
 void
-gram_free (void)
+dummy (void)
 {
-
 }
index b782cdff2af827d56888d4cad9775bda656a6f38..83476c5f43ac5877131c0d57b7ed3148d504eeeb 100644 (file)
@@ -110,17 +110,17 @@ extern void berror PARAMS((const char *));
 
 static int nvectors;
 static int nentries;
-static short **froms;
-static short **tos;
-static short *tally;
-static short *width;
-static short *actrow;
-static short *state_count;
-static short *order;
-static short *base;
-static short *pos;
-static short *table;
-static short *check;
+static short **froms = NULL;
+static short **tos = NULL;
+static short *tally = NULL;
+static short *width = NULL;
+static short *actrow = NULL;
+static short *state_count = NULL;
+static short *order = NULL;
+static short *base = NULL;
+static short *pos = NULL;
+static short *table = NULL;
+static short *check = NULL;
 static int lowzero;
 static int high;
 
@@ -306,6 +306,8 @@ output_token_translations (void)
                              ntokens < 127 ? "char" : "short",
                              "yytranslate", token_translations,
                              0, 1, max_user_token_number + 1);
+
+  XFREE (token_translations);
 }
 
 
index 6de1222b6a9ce2fb2feeb02d19f70ab84e3571a8..0517abdc961fdedbd22bfd3899753dbb6ddab12e 100644 (file)
@@ -1751,7 +1751,6 @@ packsymbols (void)
       user_toknums[bp->value] = bp->user_token_number;
       sprec[bp->value] = bp->prec;
       sassoc[bp->value] = bp->assoc;
-
     }
 
   token_translations = XCALLOC (short, max_user_token_number + 1);
index 84479da216b8c9b8e6cbad6a4e14897cc3e4d025..bf4a882fa8d66532a17e5f8d7a20c98b49b86498 100644 (file)
@@ -143,6 +143,7 @@ free_symtab (void)
          if (bp->type_name)
            XFREE (bp->type_name);
 #endif
+         XFREE (bp->tag);
          XFREE (bp);
          bp = bptmp;
        }