We should not include a system header file here, because
mach/proto/as/comm2.y goes through cpp twice. The include can cause
problems like https://github.com/davidgiven/ack/issues/1
Remove this include #<stdbool.h> and leave a comment pointing to the
includes in comm0.h. Change the few instances of bool, false, true,
to int, 0, 1.
* $State$
*/
-#include <stdbool.h>
+/*
+ * Do not #include anything here. Do it in mach/proto/as/comm0.h
+ */
-extern word_t emit_hi(struct expr_t* expr, bool is_signed);
+extern word_t emit_hi(struct expr_t* expr, int is_signed);
extern word_t emit_lo(struct expr_t* expr);
serror("16-bit value out of range");
$$ = (uint16_t) $1;
}
- | OP_HI ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, false); }
- | OP_HA ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, true); }
+ | OP_HI ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, 0); }
+ | OP_HA ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, 1); }
| OP_LO ASC_LPAR expr ASC_RPAR { $$ = emit_lo(&$3); }
;
-word_t emit_hi(struct expr_t* expr, bool is_signed)
+word_t emit_hi(struct expr_t* expr, int is_signed)
{
/* If this is a symbol reference, discard the symbol and keep only the
* offset part. */