options -w and -Wfatal-errors implemented
[cparser] / diagnostic.h
1 #ifndef DIAGNOSTIC_H
2 #define DIAGNOSTIC_H
3
4 #include "token_t.h"
5
6 void diagnosticf(const char *fmt, ...);
7 void errorf(source_position_t pos, const char *fmt, ...);
8 void warningf(source_position_t pos, const char *fmt, ...);
9
10 extern unsigned diagnostic_count;
11 extern unsigned error_count;
12 extern unsigned warning_count;
13
14 /* true if warnings should be inhibited */
15 extern bool inhibit_all_warnings;
16
17 /* true if warnings should be treated as errors */
18 extern bool warnings_are_errors;
19
20 /* true if the first error should stop the compilation */
21 extern bool fatal_errors;
22
23 #endif