420d05a15b
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.
4 lines
38 B
C
4 lines
38 B
C
#define foo foo
|
|
#define bar foo
|
|
bar
|