scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 3261788e3d8b7782ff0ade7b391572c54485e644
parent e167a1b4e19b2911a3fd1b0e97538034b421e6b6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 24 Feb 2017 06:03:36 +0100

[cc1] Add debug information to pushctx() and popctx()

This debug information is useful to understand how
the context stack is evoluting in the time.

Diffstat:
Mcc1/symbol.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -97,6 +97,7 @@ unlinkhash(Symbol *sym) void pushctx(void) { + DBG("SYM: pushed context %d", curctx+1); if (++curctx == NR_BLOCK+1) error("too many nested blocks"); } @@ -131,6 +132,7 @@ popctx(void) Symbol *next, *sym; int ns, dangling = 0; + DBG("SYM: poped context %d", curctx); /* * we have to be careful before popping the current * context, because since the parser is one token