[hackers] [scc] Warn only in not used and defined symbols || Roberto E. Vargas Caballero
commit 69f974c568329c43b9b199992d43322b8d50e0cc
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jul 19 12:03:01 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jul 19 12:03:01 2015 +0200
Warn only in not used and defined symbols
Sometimes some symbols are created but they are not defined,
like for example parameters of macros or when a symbol is looked
up in the wrong namespace.
diff --git a/cc1/symbol.c b/cc1/symbol.c
index f51410e..d7f1b19 100644
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
_AT_@ -85,8 +85,9 @@ popctx(void)
break;
}
if (sym->name) {
+ short f = sym->flags;
htab[hash(sym->name)] = sym->hash;
- if ((sym->flags & (ISUSED|ISGLOBAL)) == 0)
+ if ((f & (ISUSED|ISGLOBAL|ISDEFINED)) == ISDEFINED)
warn("'%s' defined but not used", sym->name);
}
free(sym->name);
Received on Sun Jul 19 2015 - 12:05:19 CEST
This archive was generated by hypermail 2.3.0
: Sun Jul 19 2015 - 12:12:13 CEST