summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-05-14 14:17:41 -0400
committerAdrian Thurston <thurston@complang.org>2012-05-14 14:17:41 -0400
commit66bd47337d214c51cb3b90fa086d42401d163c20 (patch)
tree3c8d590be1d66712929a9134e3777045e4cfe9f9
parentc07ff3da211df08d3fcbc3ea0b7fe67350a08142 (diff)
downloadcolm-66bd47337d214c51cb3b90fa086d42401d163c20.tar.gz
Warn about lost trees/kids only if enable-debug has been specified.
-rw-r--r--colm/program.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/colm/program.c b/colm/program.c
index 15c1be2e..d6a1fc0d 100644
--- a/colm/program.c
+++ b/colm/program.c
@@ -201,36 +201,39 @@ int colmDeleteProgram( Program *prg )
treeDownref( prg, sp, (Tree*)prg->stderrVal );
long kidLost = kidNumLost( prg );
+ long treeLost = treeNumLost( prg );
+ long parseTreeLost = parseTreeNumLost( prg );
+ long listLost = listElNumLost( prg );
+ long mapLost = mapElNumLost( prg );
+ long headLost = headNumLost( prg );
+ long locationLost = locationNumLost( prg );
+ long ilLost = ilNumLost( prg );
+
+#if DEBUG
if ( kidLost )
message( "warning: lost kids: %ld\n", kidLost );
- long treeLost = treeNumLost( prg );
if ( treeLost )
message( "warning: lost trees: %ld\n", treeLost );
- long parseTreeLost = parseTreeNumLost( prg );
if ( parseTreeLost )
message( "warning: lost parse trees: %ld\n", parseTreeLost );
- long listLost = listElNumLost( prg );
if ( listLost )
message( "warning: lost listEls: %ld\n", listLost );
- long mapLost = mapElNumLost( prg );
if ( mapLost )
message( "warning: lost mapEls: %ld\n", mapLost );
- long headLost = headNumLost( prg );
if ( headLost )
message( "warning: lost heads: %ld\n", headLost );
- long locationLost = locationNumLost( prg );
if ( locationLost )
message( "warning: lost locations: %ld\n", locationLost );
- long ilLost = ilNumLost( prg );
if ( ilLost )
message( "warning: lost ignore lists: %ld\n", ilLost );
+#endif
kidClear( prg );
treeClear( prg );