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;
|
break;
|
||||||
#if !defined NOEMIT
|
#if !defined NOEMIT
|
||||||
case tpEMIT: {
|
case tpEMIT: {
|
||||||
|
if (!SKIPPING) {
|
||||||
/* write opcode to output file */
|
/* write opcode to output file */
|
||||||
char name[40];
|
char name[40];
|
||||||
int i;
|
int i;
|
||||||
@ -1294,6 +1295,7 @@ static int command(void)
|
|||||||
} /* if */
|
} /* if */
|
||||||
stgwrite("\n");
|
stgwrite("\n");
|
||||||
check_empty(lptr);
|
check_empty(lptr);
|
||||||
|
} /* if */
|
||||||
break;
|
break;
|
||||||
} /* case */
|
} /* case */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user