kencc: make "function not declared" a warning unless compiling with -T

This commit is contained in:
aiju 2018-12-02 11:36:58 +00:00
parent a847d7a53d
commit b5f7e27f44

View file

@ -608,9 +608,11 @@ tcomo(Node *n, int f)
goto bad;
n->type = l->type->link;
if(!debug['B']){
if(l->type->down == T)
if(l->type->down == T){
if(!debug['T'])
nerrors--;
diag(n, "function not declared: %F", l);
else if(l->type->down->etype == TOLD) {
}else if(l->type->down->etype == TOLD) {
nerrors--;
diag(n, "function args not checked: %F", l);
}