Do not accept %:%: digraph in places where ## would not be accepted.

This could happen in obscure cases like the following (outside a macro):

for(int b;;-%:%:- b) ;
This commit is contained in:
Stephen Heumann 2020-01-21 07:21:58 -06:00
parent 06a3719304
commit d8097e6b31

View File

@ -4282,6 +4282,8 @@ case charKinds[ord(ch)] of
token.isDigraph := true;
if (ch = '%') and (chPtr <> eofPtr) and (chr(chPtr^) = ':') then begin
token.kind := poundpoundop; {%:%: digraph}
if charKinds[ord('#')] = illegal then
Error(1);
NextCh;
NextCh;
end