]> git.saurik.com Git - bison.git/blobdiff - src/reduce.c
Merge remote-tracking branch 'origin/maint'
[bison.git] / src / reduce.c
index 0bc1d8c7f90bbe4dbeda8cb732200d4deb7b2f4c..736cbb6a7149ad2ab8179f3102bf5c923a6c83a3 100644 (file)
@@ -298,8 +298,10 @@ nonterminals_reduce (void)
     if (!bitset_test (V, i))
       {
         nontermmap[i - ntokens] = n++;
-        warn_at (symbols[i]->location, _("nonterminal useless in grammar: %s"),
-                 symbols[i]->tag);
+        if (symbols[i]->status != used)
+          warn_at (symbols[i]->location,
+                   _("nonterminal useless in grammar: %s"),
+                   symbols[i]->tag);
       }