Check for circularity only if ENABLE_CHECKING is defined

From-SVN: r26517
This commit is contained in:
Craig Burley 1999-04-17 11:43:57 +00:00 committed by Craig Burley
parent 75e8000e18
commit 0f4668ef1a
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Sat Apr 17 14:36:19 1999 Craig Burley <craig@jcb-sc.com>
* tree.c (chainon): Check for circularity only if
ENABLE_CHECKING is defined.
1999-04-17 10:15 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cccp.c: Make fatal non-static.

View File

@ -1956,9 +1956,11 @@ chainon (op1, op2)
for (t1 = op1; TREE_CHAIN (t1); t1 = TREE_CHAIN (t1))
;
TREE_CHAIN (t1) = op2;
#ifdef ENABLE_CHECKING
for (t2 = op2; t2; t2 = TREE_CHAIN (t2))
if (t2 == t1)
abort (); /* Circularity created. */
#endif
return op1;
}
else return op2;