From d8097e6b31ff7cfb473efa872e36060f56cb48f2 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Tue, 21 Jan 2020 07:21:58 -0600 Subject: [PATCH] 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) ; --- Scanner.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scanner.pas b/Scanner.pas index 5d558c8..b93dd4e 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -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