diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-17 10:15:23 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-17 10:15:23 -0700 |
commit | 420d05a15b90658680b87b4d83b092768590319a (patch) | |
tree | 52a5a0ffc1e4919ee08c2e1add30d78d8fbc6d4c /main | |
parent | e36a4d5be9a9fa3abc4fb5d0b6c3601934f7a343 (diff) |
Add test and fix bug leading to infinite recursion.
The test case here is simply "#define foo foo" and "#define bar foo"
and then attempting to expand "bar".
Previously, our termination condition for the recursion was overly
simple---just looking for the single identifier that began the
expansion. We now fix this to maintain a stack of identifiers and
terminate when any one of them occurs in the replacement list.
Diffstat (limited to 'main')
0 files changed, 0 insertions, 0 deletions