PP: Partially address issue #738: handle premature end of argument when token pasting.
This commit is contained in:
parent
45c1b5b980
commit
fb22b69fc6
4 changed files with 10 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue