PP: Partially address issue #738: handle premature end of argument when token pasting.
This commit is contained in:
@@ -986,6 +986,8 @@ TPpContext::TokenStream* TPpContext::PrescanMacroArg(TokenStream& arg, TPpToken*
|
||||
int token;
|
||||
while ((token = scanToken(ppToken)) != tMarkerInput::marker && token != EndOfInput) {
|
||||
token = tokenPaste(token, *ppToken);
|
||||
if (token == tMarkerInput::marker || token == EndOfInput)
|
||||
break;
|
||||
if (token == PpAtomIdentifier && MacroExpand(ppToken, false, newLineOkay) != 0)
|
||||
continue;
|
||||
expandedArg->putToken(token, ppToken);
|
||||
|
||||
Reference in New Issue
Block a user