From: Joel E. Denny Date: Fri, 30 Apr 2010 18:41:07 +0000 (-0400) Subject: Revert 2009-12-30 change for undefined %prec token complaints. X-Git-Tag: v2.7.90~692 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/02354690ee02dfa05564137aafc6721eb54d21ab Revert 2009-12-30 change for undefined %prec token complaints. That is, keep them as warnings because that should be sufficient to satisfy POSIX without creating backward compatibility issues. Suggested by Richard Stallman at . * NEWS (2.5): Remove mention of complaint. * src/reader.c (grammar_rule_check): Convert warning back to complaint. * tests/input.at (%prec's token must be defined): Update. --- diff --git a/ChangeLog b/ChangeLog index f16e0565..c1293574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-04-30 Joel E. Denny + + Revert 2009-12-30 change for undefined %prec token complaints. + That is, keep them as warnings because that should be sufficient + to satisfy POSIX without creating backward compatibility issues. + Suggested by Richard Stallman at + . + * NEWS (2.5): Remove mention of complaint. + * src/reader.c (grammar_rule_check): Convert warning back to + complaint. + * tests/input.at (%prec's token must be defined): Update. + 2010-04-25 Joel E. Denny build: don't require src/bison during bootstrap. diff --git a/NEWS b/NEWS index 4c4409b1..acdd5be1 100644 --- a/NEWS +++ b/NEWS @@ -180,12 +180,6 @@ Bison News discussion of how to suppress C preprocessor warnings about YYFAIL being unused, see the Bison 2.4.2 NEWS entry. -** `%prec IDENTIFIER' requires IDENTIFIER to be defined separately. - - As promised in Bison 2.4.2's NEWS entry, it is now an error if a token - that appears after a %prec directive is not defined by %token, %left, - %right, or %nonassoc. This is required by POSIX. - ** Temporary hack for adding a semicolon to the user action. Previously, Bison appended a semicolon to every user action for diff --git a/src/reader.c b/src/reader.c index 03c5bae5..f1be24b3 100644 --- a/src/reader.c +++ b/src/reader.c @@ -327,8 +327,8 @@ grammar_rule_check (const symbol_list *r) if (r->ruleprec && r->ruleprec->tag[0] != '\'' && r->ruleprec->tag[0] != '"' && !r->ruleprec->declared && !r->ruleprec->prec) - complain_at (r->location, _("token for %%prec is not defined: %s"), - r->ruleprec->tag); + warn_at (r->location, _("token for %%prec is not defined: %s"), + r->ruleprec->tag); } diff --git a/tests/input.at b/tests/input.at index 71fc3562..64a18093 100644 --- a/tests/input.at +++ b/tests/input.at @@ -806,8 +806,8 @@ AT_DATA([[input.y]], start: %prec PREC ; ]]) -AT_BISON_CHECK([[input.y]], [[1]], [], -[[input.y:2.8-17: token for %prec is not defined: PREC +AT_BISON_CHECK([[input.y]], [[0]], [], +[[input.y:2.8-17: warning: token for %prec is not defined: PREC ]]) AT_CLEANUP