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

View File

@@ -1460,8 +1460,7 @@ AT_BISON_CHECK([[-Wno-none input.y]], [[0]], [[]],
# -Werror is not disabled by -Wnone or equivalent.
AT_BISON_CHECK([[-Werror,none,yacc input.y]], [[1]], [[]], [[stderr]])
AT_CHECK([[sed 's/^.*bison:/bison:/' stderr]], [[0]],
[[bison: warnings being treated as errors
input.y:2.1-7: error: POSIX Yacc forbids dashes in symbol names: foo-bar [-Werror=yacc]
[[input.y:2.1-7: error: POSIX Yacc forbids dashes in symbol names: foo-bar [-Werror=yacc]
]])
[mv stderr experr]
AT_BISON_CHECK([[-Werror,no-all,yacc input.y]], [[1]], [[]], [[experr]])