Fully prohibit redefinition of predefined macros.

Code like the following was previously being allowed:

#define __STDC__ /* no tokens */
This commit is contained in:
Stephen Heumann 2022-02-13 18:10:45 -06:00
parent 5d7c002819
commit c169c2bf92
1 changed files with 2 additions and 0 deletions

View File

@ -2552,6 +2552,8 @@ var
mPtr^.algorithm := 0;
if IsDefined(mPtr^.name) then begin
mf := macroFound;
if mf^.readOnly then
goto 3;
if mf^.parameters = mPtr^.parameters then begin
tk1 := mf^.tokens;
tk2 := mPtr^.tokens;