X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/affac6132ae6ee354e1497e456b5c81a0c84334f..fcd8e2011da5f87d20189ad69a989c166e05413f:/src/symlist.c diff --git a/src/symlist.c b/src/symlist.c index ed42ce1e..70db82f0 100644 --- a/src/symlist.c +++ b/src/symlist.c @@ -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)