Remove #include <stdbool.h> from mach/powerpc/as/mach1.c
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.
This commit is contained in:
parent
3c1d2d79f0
commit
f4cfbedd5c
3 changed files with 7 additions and 5 deletions
|
@ -3,7 +3,9 @@
|
||||||
* $State$
|
* $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);
|
extern word_t emit_lo(struct expr_t* expr);
|
||||||
|
|
|
@ -218,8 +218,8 @@ e16
|
||||||
serror("16-bit value out of range");
|
serror("16-bit value out of range");
|
||||||
$$ = (uint16_t) $1;
|
$$ = (uint16_t) $1;
|
||||||
}
|
}
|
||||||
| OP_HI ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, false); }
|
| OP_HI ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, 0); }
|
||||||
| OP_HA ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, true); }
|
| OP_HA ASC_LPAR expr ASC_RPAR { $$ = emit_hi(&$3, 1); }
|
||||||
| OP_LO ASC_LPAR expr ASC_RPAR { $$ = emit_lo(&$3); }
|
| OP_LO ASC_LPAR expr ASC_RPAR { $$ = emit_lo(&$3); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
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
|
/* If this is a symbol reference, discard the symbol and keep only the
|
||||||
* offset part. */
|
* offset part. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue