changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: kencc: make "function not declared" a warning unless compiling with -T

changeset 6934: 7533f07172aa
parent 6933: 439b5b00d04b
child 6935: a143989c4608
author: aiju
date: Sun, 02 Dec 2018 11:36:58 +0000
files: sys/src/cmd/cc/com.c
description: kencc: make "function not declared" a warning unless compiling with -T
     1.1--- a/sys/src/cmd/cc/com.c
     1.2+++ b/sys/src/cmd/cc/com.c
     1.3@@ -608,9 +608,11 @@ tcomo(Node *n, int f)
     1.4 			goto bad;
     1.5 		n->type = l->type->link;
     1.6 		if(!debug['B']){
     1.7-			if(l->type->down == T)
     1.8+			if(l->type->down == T){
     1.9+				if(!debug['T'])
    1.10+					nerrors--;
    1.11 				diag(n, "function not declared: %F", l);
    1.12-			else if(l->type->down->etype == TOLD) {
    1.13+			}else if(l->type->down->etype == TOLD) {
    1.14 				nerrors--;
    1.15 				diag(n, "function args not checked: %F", l);
    1.16 			}