X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9503b0a4a8928afa0fdab88672f6127ee7e87963..1048a1c90168c3cfb38eb54c6ab83b98af1bb43e:/NEWS diff --git a/NEWS b/NEWS index 7e5bda2d..1d4e0fa1 100644 --- a/NEWS +++ b/NEWS @@ -13,18 +13,59 @@ GNU Bison NEWS ** Warnings -*** Deprecated constructs +*** Enhancements of the -Werror option - The new 'deprecated' warning category flags obsolete constructs whose - support will be discontinued. It is enabled by default. These warnings - used to be reported as 'other' warnings. + The -Werror=CATEGORY option is now recognized, and will treat specified + warnings as errors. The warnings need not have been explictly activated + using the -W option, this is similar to what gcc 4.7 does. + + For example, given the following command line, Bison will treat both + warnings related to POSIX Yacc incompatiblities and S/R conflicts as + errors (and only those): + + $ bison -Werror=yacc,error=conflicts-sr input.y -*** Warning categories are now displayed + If no categories are specified, -Werror will make all active warnings into + errors. For example, the following line does the same the previous example: + + $ bison -Werror -Wnone -Wyacc -Wconflicts-sr input.y + + (By default -Wconflicts-sr,conflicts-rr,deprecated,other is enabled.) + + Note that the categories in this -Werror option may not be prefixed with + "no-". However, -Wno-error[=CATEGORY] is valid. + + Note that -y enables -Werror=yacc. Therefore it is now possible to require + Yacc-like behavior (e.g., always generate y.tab.c), but to report + incompatibilities as warnings: "-y -Wno-error=yacc". + +*** Warning categories are now displayed and prefix changes For instance: foo.y:4.6: warning: type clash on default action: != [-Wother] + In the case of warnings treated as errors, the suffix is displayed, in a + manner similar to gcc, as [-Werror=CATEGORY]. Also, the prefix is changed + from "warning: " to "error: ". + + For instance, considering the above change, an output for -Werror=other + would have been: + + bison: warnings being treated as errors + input.y:1.1: warning: stray ',' treated as white space [-Wother] + + But it is actually: + + bison: warnings being treated as errors + input.y:1.1: error: stray ',' treated as white space [-Werror=other] + +*** Deprecated constructs + + The new 'deprecated' warning category flags obsolete constructs whose + support will be discontinued. It is enabled by default. These warnings + used to be reported as 'other' warnings. + *** Useless semantic types Bison now warns about useless (uninhabited) semantic types. Since