summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cc
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2018-12-02 11:36:58 +0000
committeraiju <devnull@localhost>2018-12-02 11:36:58 +0000
commitb5f7e27f441cc6d5e30532fdd2d506a4f30f4a04 (patch)
tree3a81254a35f7cd1dbd201dff884c0a2e3f897880 /sys/src/cmd/cc
parenta847d7a53d64b1f7d11eb3b969c2684ea0aa399b (diff)
kencc: make "function not declared" a warning unless compiling with -T
Diffstat (limited to 'sys/src/cmd/cc')
-rw-r--r--sys/src/cmd/cc/com.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/cc/com.c b/sys/src/cmd/cc/com.c
index 9ac706acc..5072c8a21 100644
--- a/sys/src/cmd/cc/com.c
+++ b/sys/src/cmd/cc/com.c
@@ -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);
}