X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ddc8ede1abfd807faf5ddb0ee6c56cead0db84e3..868d2d96387042d8aba99fe427e76d186a7a4759:/src/reader.c diff --git a/src/reader.c b/src/reader.c index 800ecc22..928be1b8 100644 --- a/src/reader.c +++ b/src/reader.c @@ -488,7 +488,11 @@ packgram (void) rule. Thus, the midrule actions have already been scanned in order to set `used' flags for this rule's rhs, so grammar_rule_check will work properly. */ - grammar_rule_check (p); + /* Don't check the generated rule 0. It has no action, so some rhs + symbols may appear unused, but the parsing algorithm ensures that + %destructor's are invoked appropriately. */ + if (p != grammar) + grammar_rule_check (p); for (p = p->next; p && p->sym; p = p->next) {