Fix conditional compilation not skipping #emit directives
#emit directives inside #if ... #endif blocks were processed by the compiler regardless of the condition. --------- test code -------- main() { #if 0 #emit halt 1 #endif } ----- end of test code -----
This commit is contained in:
parent
e0a61e5f93
commit
6aa5ae3b00
@ -1228,6 +1228,7 @@ static int command(void)
|
||||
break;
|
||||
#if !defined NOEMIT
|
||||
case tpEMIT: {
|
||||
if (!SKIPPING) {
|
||||
/* write opcode to output file */
|
||||
char name[40];
|
||||
int i;
|
||||
@ -1294,6 +1295,7 @@ static int command(void)
|
||||
} /* if */
|
||||
stgwrite("\n");
|
||||
check_empty(lptr);
|
||||
} /* if */
|
||||
break;
|
||||
} /* case */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user