* Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
[bison.git] / src / symlist.c
index ed42ce1e7747994b05ed569cf41c5289cff3aba0..70db82f07cd8a04242cbdce0e41a1b1284540baf 100644 (file)
@@ -1,6 +1,6 @@
 /* Lists of symbols for Bison
 
-   Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -38,6 +38,8 @@ symbol_list_new (symbol *sym, location loc)
   res->sym = sym;
   res->location = loc;
 
+  res->midrule = NULL;
+
   res->action = NULL;
   res->used = false;
 
@@ -56,11 +58,12 @@ symbol_list_new (symbol *sym, location loc)
 `------------------*/
 
 void
-symbol_list_print (symbol_list *l, FILE *f)
+symbol_list_print (const symbol_list *l, FILE *f)
 {
   for (/* Nothing. */; l && l->sym; l = l->next)
     {
       symbol_print (l->sym, f);
+      fprintf (stderr, l->used ? " used" : " unused");
       if (l && l->sym)
        fprintf (f, ", ");
     }
@@ -96,7 +99,7 @@ symbol_list_free (symbol_list *list)
 `--------------------*/
 
 unsigned int
-symbol_list_length (symbol_list *l)
+symbol_list_length (const symbol_list *l)
 {
   int res = 0;
   for (/* Nothing. */; l; l = l->next)