1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-27 20:27:45 +00:00

Ensure compiler sees debug printf even if won't be executed (#433)

If the debugging printf macros are elided by the preprocessor
rather than being removed by the compiler's optimizer then
the debugging statements may get out-of-date as variables are
modified.  Wrap the non-debug case in "if (0) ..." instead.
This commit is contained in:
Nick Briggs
2022-08-09 18:11:05 -07:00
committed by GitHub
parent 681f3b2592
commit 4bd1f4b49a
2 changed files with 5 additions and 7 deletions

View File

@@ -397,9 +397,7 @@ LispPTR vmem_save(char *sysout_file_name)
for (i = 0; i < vmemsize; i++) {
if (GETPAGEOK(fptovp, i) != 0177777) {
int oldfptovp = GETFPTOVP(fptovp, i);
#ifdef DEBUG
int saveoldfptovp = oldfptovp;
#endif
int contig_pages = 0;
register char *base_addr;