Add a C23 standard option to the compiler.

The default is still c17compat.
This commit is contained in:
Stephen Heumann 2024-08-27 22:06:55 -05:00
parent 3a0dbd2e15
commit f59c2cf93d
3 changed files with 10 additions and 1 deletions

View File

@ -4895,6 +4895,14 @@ repeat
cStd := c17;
strictMode := true;
end {else if}
else if (stdName^ = 'c23compat') or (stdName^ = 'c24compat') then begin
cStd := c23;
strictMode := false;
end {else if}
else if (stdName^ = 'c23') or (stdName^ = 'c24') then begin
cStd := c23;
strictMode := true;
end {else if}
else
FlagErrorAndSkip;
end {else if}

View File

@ -953,6 +953,7 @@ stdcVersion start __STDC_VERSION__ values
dc i4'199901' c99
dc i4'201112' c11
dc i4'201710' c17
dc i4'202311' c23
end
macRomanToUCS start

View File

@ -22,7 +22,7 @@ var
charSym: array[minChar..maxChar] of tokenEnum; {symbols for single char symbols}
reservedWords: array[_Alignassy..whilesy] of string[14]; {reserved word strings}
wordHash: array[0..25] of tokenEnum; {for hashing reserved words}
stdcVersion: array[c95..c17] of longint; {__STDC_VERSION__ values}
stdcVersion: array[c95..c23] of longint; {__STDC_VERSION__ values}
{from ASM.PAS}
{------------}