From: Joel E. Denny Date: Sat, 4 Apr 2009 06:10:33 +0000 (-0400) Subject: Document semicolon warnings. X-Git-Tag: v2.7.90~898 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/197b82ba54902fcc024f6745b3e7cbf88845099a?ds=sidebyside Document semicolon warnings. * NEWS (2.5): Here. (cherry picked from commit a2d0567444f8ab1fc079796169a9845fec62ed0f) --- diff --git a/ChangeLog b/ChangeLog index f879dbd7..de7a46ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-04 Joel E. Denny + + Document semicolon warnings. + * NEWS (2.5): Here. + 2009-04-14 Akim Demaille variables: use `parse.assert' instead of `assert'. diff --git a/NEWS b/NEWS index b436896f..96016482 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,27 @@ Bison News for any NAME and VALUE. Omitting `=VALUE' on the command line is equivalent to omitting `"VALUE"' in the declaration. +** Temporary hack for adding a semicolon to the user action. + + Previously, Bison appended a semicolon to every user action for + reductions when the output language defaulted to C (specifically, when + neither %yacc, %language, %skeleton, or equivalent command-line + options were specified). This allowed actions such as + + exp: exp "+" exp { $$ = $1 + $3 }; + + instead of + + exp: exp "+" exp { $$ = $1 + $3; }; + + As a first step in removing this misfeature, Bison now issues a + warning when it appends a semicolon. Moreover, in cases where Bison + cannot easily determine whether a semicolon is needed (for example, an + action ending with a cpp directive or a braced compound initializer), + it no longer appends one. Thus, the C compiler might now complain + about a missing semicolon where it did not before. Future releases of + Bison will cease to append semicolons entirely. + * Changes in version 2.4.2 (????-??-??): * Changes in version 2.4.1 (2008-12-11):