mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 10:43:29 +00:00
Add a non-error diagnostic that can't be silenced.
It is inteded for flagging buggy conditions in the compiler, particularly after having fixed the original bug (in case something comes back from the dead).
This commit is contained in:
parent
3306039da2
commit
5f676c367f
2 changed files with 22 additions and 0 deletions
|
@ -49,6 +49,8 @@ struct expr_s *notice (struct expr_s *e, const char *fmt, ...)
|
|||
__attribute__ ((format (printf, 2, 3)));
|
||||
void debug (struct expr_s *e, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
void bug (struct expr_s *e, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
|
||||
//@}
|
||||
|
||||
|
|
|
@ -121,6 +121,26 @@ debug (expr_t *e, const char *fmt, ...)
|
|||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
bug (expr_t *e, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
string_t file = pr.source_file;
|
||||
int line = pr.source_line;
|
||||
|
||||
va_start (args, fmt);
|
||||
|
||||
report_function (e);
|
||||
if (e) {
|
||||
file = e->file;
|
||||
line = e->line;
|
||||
}
|
||||
fprintf (stderr, "%s:%d: BUG: ", GETSTR (file), line);
|
||||
vfprintf (stderr, fmt, args);
|
||||
fputs ("\n", stderr);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
expr_t *
|
||||
notice (expr_t *e, const char *fmt, ...)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue