aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c_lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_lex.c')
-rw-r--r--src/c_lex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/c_lex.c b/src/c_lex.c
index 43e4b18..1c8dc93 100644
--- a/src/c_lex.c
+++ b/src/c_lex.c
@@ -695,7 +695,7 @@ putmac(internstr name, Macro *mac)
warn(&(Span){mac->span}, "redefining builtin macro");
else {
warn(&(Span){mac->span}, "redefining macro");
- note(&(Span){slot->span}, "previous definition:");
+ note(DGWARN, &(Span){slot->span}, "previous definition:");
}
freemac(slot);
*slot = *mac;
@@ -757,7 +757,7 @@ lxfatal(Lexer *lx, const Span *span, const char *fmt, ...)
int n = lx->macstk ? lx->macstk - mstk : 0, i = 0;
for (MacroStack *l = lx->macstk; l && l > mstk; --l, ++i) {
if (i < 4 || i > n - 5) {
- note(&(Span){l->exspan}, "expanded from here");
+ note(DGERROR, &(Span){l->exspan}, "expanded from here");
} else if (i == 5) {
efmt(" (...) \n");
}
@@ -765,7 +765,7 @@ lxfatal(Lexer *lx, const Span *span, const char *fmt, ...)
for (Lexer *sv = lx->save; sv; sv = sv->save) {
int line;
const char *f = getfilepos(&line, NULL, sv->fileid, sv->chridx-2);
- note(NULL, "in file included from %s:%d", f, line);
+ note(DGERROR, NULL, "in file included from %s:%d", f, line);
}
if (!fmt || span) efmt("Aborting due to previous error.\n");
exit(1);
@@ -829,7 +829,7 @@ tokpaste(Lexer *lx, Token *dst, const Token *l, const Token *r)
if (dst) {
error(&l->span, "pasting %'tk and %'tk does not form a valid preprocessing token", l, r);
- note(&r->span, "right-hand side");
+ note(DGERROR, &r->span, "right-hand side");
}
return 0;
}
@@ -1553,7 +1553,7 @@ Switch:
vlong m = expr(lx, &xu, 1, ignore || !x);
if (elex(lx, &tk) != ':') {
error(&tk.span, "expected ':'");
- note(&span, "to match conditional expression here");
+ note(DGERROR, &span, "to match conditional expression here");
goto Err;
}
y = expr(lx, &yu, 1, ignore || x);
@@ -2175,7 +2175,7 @@ Begin:
if (sv->inclnerror != nerror || sv->inclnwarn != nwarn) {
int line;
const char *f = getfilepos(&line, NULL, sv->fileid, sv->chridx-2);
- note(NULL, "in file included from %s:%d", f, line);
+ note(DGERROR, NULL, "in file included from %s:%d", f, line);
}
memcpy(lx, sv, sizeof *lx);
free(sv);