Copy file and line info during a macro expansion.

The file and line number information needs to be copied when
doing a macro expansion. This prevents a macro that expands to
an `ifdef of other construct that needs to push the stack
from core dumping.
This commit is contained in:
Cary R 2008-06-25 10:49:57 -07:00 committed by Stephen Williams
parent 8c54803094
commit 4163eb28d0
1 changed files with 2 additions and 0 deletions

View File

@ -1362,6 +1362,8 @@ static void do_expand(int use_args)
}
isp->next = istack;
isp->path = strdup(istack->path);
isp->lineno = istack->lineno;
istack->yybs = YY_CURRENT_BUFFER;
istack = isp;