introduce -Wdeprecated

GCC seems to be using "deprecated" consistently over "obsoleted", so
use -Wdeprecated rather than -Wobsolete.

* src/complain.h (warnings): Add Wdeprecated.
* src/complain.c (warnings_print_categories): Adjust.
* src/getargs.c: Likewise.
* doc/bison.texi: Document it.

* src/scan-code.l: Use this category for the trailing ';' support.
* tests/actions.at: Adjust expected output.
This commit is contained in:
Akim Demaille
2012-08-20 09:29:05 +02:00
parent 31557b9ead
commit 518e88308f
7 changed files with 55 additions and 40 deletions

View File

@@ -225,9 +225,9 @@ ref -?[0-9]+|{id}|"["{id}"]"|"$"
if (outer_brace && !yacc_flag && language_prio == default_prio
&& skeleton_prio == default_prio && need_semicolon && ! in_cpp)
{
complain_at (*loc, Wother,
complain_at (*loc, Wdeprecated,
_("a ';' might be needed at the end of action code"));
complain_at (*loc, Wother,
complain_at (*loc, Wdeprecated,
_("future versions of Bison will not add the ';'"));
obstack_1grow (&obstack_for_string, ';');
}