Print to diagbuf so that prints stay together.
[rsc] --rw-rw-r-- M 129339 glenda sys 26837 Dec 12 07:21 sys/src/cmd/cc/dcl.c
/n/sourcesdump/2005/1212/plan9/sys/src/cmd/cc/dcl.c:1324,1331 -
/n/sourcesdump/2005/1213/plan9/sys/src/cmd/cc/dcl.c:1324,1331
if(s->type != T)
if(s->class != c || !sametype(t, s->type) || t->etype == TENUM) {
diag(Z, "external redeclaration of: %s", s->name);
- print(" %s %T %L\n", cnames[c], t, nearln);
- print(" %s %T %L\n", cnames[s->class], s->type, s->varlineno);
+ Bprint(&diagbuf, " %s %T %L\n", cnames[c], t, nearln);
+ Bprint(&diagbuf, " %s %T %L\n", cnames[s->class], s->type, s->varlineno);
}
tmerge(t, s);
s->type = t;
|