diagnostics: complain about Bison directives when -Wyacc

* src/complain.h, src/complain.c (bison_directive): New.
* src/scan-gram.l (BISON_DIRECTIVE): New.
Use it for Bison extensions.
This commit is contained in:
Akim Demaille
2013-02-27 15:43:26 +01:00
committed by Akim Demaille
parent ebe9b20841
commit d92ed9d9f7
6 changed files with 62 additions and 34 deletions

View File

@@ -119,6 +119,9 @@ void complain_indent (location const *loc, warnings flags, unsigned *indent,
__attribute__ ((__format__ (__printf__, 4, 5)));
/** GNU Bison extension not valid with POSIX Yacc. */
void bison_directive (location const *loc, char const *directive);
/** Report an obsolete syntax, suggest the updated one. */
void deprecated_directive (location const *loc,
char const *obsolete, char const *updated);