Avoid storing stale values of __DATE__ or __TIME__ in sym files.

This could happen in some very obscure cases like using these macros for the names of segments or include files. The fix is to just terminate precompiled header generation if they are encountered.
This commit is contained in:
Stephen Heumann 2019-12-24 15:58:12 -06:00
parent 095807517b
commit ae6de310c7
1 changed files with 2 additions and 0 deletions

View File

@ -1391,6 +1391,7 @@ if macro^.readOnly then begin {handle special macros}
token.sval := dateStr;
tokenStart := @dateStr^.str;
tokenEnd := pointer(ord4(tokenStart)+dateStr^.length);
TermHeader; {Don't save stale value in sym file}
end;
4: begin {__TIME__}
@ -1400,6 +1401,7 @@ if macro^.readOnly then begin {handle special macros}
token.sval := timeStr;
tokenStart := @timeStr^.str;
tokenEnd := pointer(ord4(tokenStart)+timeStr^.length);
TermHeader; {Don't save stale value in sym file}
end;
5: begin {__STDC__}