Add a warning() function, similiar to yyerror()

This function produces a similar output to the other error handlers, including printing to stderr, and including a stack trace. However, ‘warning’ is displayed instead of ‘ERROR’, and the compilation does not fail.

This function is now used for the deprecation warnings, ensuring that these errors can be found.
This commit is contained in:
Ben10do
2017-04-02 13:18:29 +01:00
parent 53842cd07d
commit ff2ba7290c
3 changed files with 21 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ extern void opt_Parse(char *s);
noreturn void fatalerror(const char *fmt, ...);
void yyerror(const char *fmt, ...);
void warning(const char *fmt, ...);
#define YY_FATAL_ERROR fatalerror