From 22627cbc0d249b2613bab1ddbf1a1932f69f8445 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Fri, 30 Aug 2024 13:52:09 -0500 Subject: [PATCH] Permit one-argument version of static_assert in C23 mode. --- Parser.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Parser.pas b/Parser.pas index 563792f..682897d 100644 --- a/Parser.pas +++ b/Parser.pas @@ -2782,8 +2782,12 @@ if (expressionType = nil) or (expressionType^.kind <> scalarType) then Error(18) else if expressionValue = 0 then Error(132); -Match(commach, 86); -Match(stringconst, 83); +if token.kind = commach then begin + NextToken; + Match(stringconst, 83); + end {if} +else if cStd < c23 then + Error(86); Match(rparench, 12); Match(semicolonch, 22); end; {DoStaticAssert}