X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/378f4bd846c4312ddeb11f151382226e30050d3c..84866159725a9df9febc1050643c0355eba5916c:/NEWS diff --git a/NEWS b/NEWS index 2b7c1013..784efeb7 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,17 @@ Changes in version 2.1a: | exp "+" exp { $$ = $1; (void) $3; } ; + If there are mid-rule actions, the warning is issued if no action + uses it. The following triggers no warning: $1 and $3 are used. + + exp: exp { push ($1); } '+' exp { push ($3); sum (); }; + + Mid-rule actions that use $$ cause the corresponding value to be + set, therefore the following action must use it. The following rule + triggers a warning about $2. + + exp: '1' { $$ = 1; } '+' exp { $$ = $1 + $4; }; + The warning is intended to help catching lost values and memory leaks. If a value is ignored, its associated memory typically is not reclaimed.