diff options
| author | aiju <devnull@localhost> | 2018-12-01 11:39:49 +0000 |
|---|---|---|
| committer | aiju <devnull@localhost> | 2018-12-01 11:39:49 +0000 |
| commit | d9b9e15d6bbdae625b3613bb0a704d269cc83098 (patch) | |
| tree | 113ae43c2289b5c7ebe24bdabfa60dc9dec0c8ec | |
| parent | 75f5332c9dce891845e57b188efad28d7530d8ae (diff) | |
| download | plan9front-d9b9e15d6bbdae625b3613bb0a704d269cc83098.tar.xz | |
kencc: turn "function args not checked" warning into "function not declared" error if appropriate
| -rw-r--r-- | sys/src/cmd/cc/com.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/src/cmd/cc/com.c b/sys/src/cmd/cc/com.c index f67294510..9ac706acc 100644 --- a/sys/src/cmd/cc/com.c +++ b/sys/src/cmd/cc/com.c @@ -607,11 +607,14 @@ tcomo(Node *n, int f) if(o | tcoma(l, r, l->type->down, 1)) goto bad; n->type = l->type->link; - if(!debug['B']) - if(l->type->down == T || l->type->down->etype == TOLD) { + if(!debug['B']){ + if(l->type->down == T) + diag(n, "function not declared: %F", l); + else if(l->type->down->etype == TOLD) { nerrors--; diag(n, "function args not checked: %F", l); } + } dpcheck(n); break; |
