]> git.saurik.com Git - bison.git/blobdiff - src/symlist.c
warnings: used but undeclared symbols are warnings
[bison.git] / src / symlist.c
index 874e238ac3faccbdf229aceec15dde684a1755b0..03169450d32b86940f7d85cc157e9f383144b51f 100644 (file)
@@ -232,6 +232,8 @@ symbol_list_destructor_set (symbol_list *node, char const *code, location loc)
     {
       case SYMLIST_SYMBOL:
         symbol_destructor_set (node->content.sym, &destructor);
+        if (node->content.sym->status == needed)
+          node->content.sym->status = used;
         break;
       case SYMLIST_TYPE:
         semantic_type_destructor_set (
@@ -256,6 +258,8 @@ symbol_list_printer_set (symbol_list *node, char const *code, location loc)
     {
       case SYMLIST_SYMBOL:
         symbol_printer_set (node->content.sym, &printer);
+        if (node->content.sym->status == needed)
+          node->content.sym->status = used;
         break;
       case SYMLIST_TYPE:
         semantic_type_printer_set (