errors: don't display "warnings treated as errors"

This line doesn't add any meaningful information anymore, the appended
[-Werror=CATEGORY] is enough.  It is actually more insightful, as it
allows to distinguish warnings treated as errors from those that
aren't.  This line is also removed by gcc 4.8.

* src/complain.c (set_warnings_issued): The only action left was
checking if the error bit corresponding to the warning issued was set,
and that function was only called once. Therefore, remove it, and do
its job directly in the caller...
(complains): here.
* src/complains.h: Adjust.
* tests/input.at: Adjust.
* NEWS: Document this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-09-27 10:52:47 +00:00
committed by Akim Demaille
parent 1048a1c901
commit 46bdb8ec59
4 changed files with 15 additions and 42 deletions

21
NEWS
View File

@@ -39,25 +39,24 @@ GNU Bison NEWS
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
*** The display of warnings is now richer
For instance:
The option that controls a given warning is now displayed:
foo.y:4.6: warning: type clash on default action: <foo> != <bar> [-Wother]
foo.y:4.6: warning: type clash on default action: <foo> != <bar> [-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: ".
In the case of warnings treated as errors, the prefix is changed from
"warning: " to "error: ", and the suffix is displayed, in a manner similar
to gcc, as [-Werror=CATEGORY].
For instance, considering the above change, an output for -Werror=other
would have been:
For instance, where the previous version of Bison would report (and exit
with failure):
bison: warnings being treated as errors
input.y:1.1: warning: stray ',' treated as white space [-Wother]
input.y:1.1: warning: stray ',' treated as white space
But it is actually:
it now reports:
bison: warnings being treated as errors
input.y:1.1: error: stray ',' treated as white space [-Werror=other]
*** Deprecated constructs