diff options
| author | 2026-03-19 22:09:22 +0100 | |
|---|---|---|
| committer | 2026-03-20 08:25:14 +0100 | |
| commit | cdc076e6adf2e8066872d30535c71e128c5375ca (patch) | |
| tree | 0e39e02b857fe41239aa9e952fbcf1915899d6b9 /src/c.c | |
| parent | fdbe13a0e9fe866310ec198fec43172ccad89106 (diff) | |
io: make -w suppress notes too
Diffstat (limited to 'src/c.c')
| -rw-r--r-- | src/c.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -310,11 +310,11 @@ putdecl(CComp *cm, const Decl *decl) Match: if ((cm->env->up != NULL && decl->scls == SCSTATIC) || (l->isdef && decl->isdef)) { error(&decl->span, "redefinition of '%s'", decl->name); - note(&l->span, "previously defined here"); + note(DGERROR, &l->span, "previously defined here"); break; } else if (!redeclarationok(l, decl)) { error(&decl->span, "incompatible redeclaration of '%s'", decl->name); - note(&l->span, "previously declared here"); + note(DGERROR, &l->span, "previously declared here"); break; } if (l->isdef && !decl->isdef) return l - declsbuf.p; @@ -801,7 +801,7 @@ callexpr(CComp *cm, const Span *span_, const Expr *callee) td->nmemb, td->nmemb != 1 ? "s" : ""); printsig = 1; } - if (printsig) note(&callee->span, "function signature is '%ty'", ty); + if (printsig) note(DGERROR, &callee->span, "function signature is '%ty'", ty); ex = mkexpr(ECALL, span, ty.t == TYFUNC ? td->ret : ty, .narg = args.n, .sub = alloc(&cm->exarena, (args.n+1)*sizeof(Expr), 0)); @@ -2229,7 +2229,7 @@ tagtype(CComp *cm, enum toktag kind) &tk, kind); else error(&tk.span, "redefinition of '%tt %s'", kind, tag); - note(&span, "previous definition:"); + note(DGERROR, &span, "previous definition:"); } } if (tt == TYENUM) @@ -2241,7 +2241,7 @@ tagtype(CComp *cm, enum toktag kind) if (t.t != tt) { error(&tk.span, "declaring tagged type %'tk as %tt clashes with previous definition", &tk, kind); - note(&span, "previous definition:"); + note(DGERROR, &span, "previous definition:"); } return t; } @@ -4021,7 +4021,7 @@ genswitch(CComp *cm, Function *fn, const Expr *ex) assert(c->val >= prev); if (c->val == prev) { error(&c->span, "duplicate case value"); - note(&c[-1].span, "previously defined here"); + note(DGERROR, &c[-1].span, "previously defined here"); } } EMITS { |