From f4cfbedd5c74e82494770afd62f9fe22e1cba8c7 Mon Sep 17 00:00:00 2001 From: George Koehler Date: Mon, 30 Jan 2017 16:39:23 -0500 Subject: [PATCH] Remove #include 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 # and leave a comment pointing to the includes in comm0.h. Change the few instances of bool, false, true, to int, 0, 1. --- mach/powerpc/as/mach1.c | 6 ++++-- mach/powerpc/as/mach4.c | 4 ++-- mach/powerpc/as/mach5.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mach/powerpc/as/mach1.c b/mach/powerpc/as/mach1.c index a1977f466..44b415ff8 100644 --- a/mach/powerpc/as/mach1.c +++ b/mach/powerpc/as/mach1.c @@ -3,7 +3,9 @@ * $State$ */ -#include +/* + * 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); diff --git a/mach/powerpc/as/mach4.c b/mach/powerpc/as/mach4.c index 7464dcb6a..640573fa1 100644 --- a/mach/powerpc/as/mach4.c +++ b/mach/powerpc/as/mach4.c @@ -218,8 +218,8 @@ e16 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); } ; diff --git a/mach/powerpc/as/mach5.c b/mach/powerpc/as/mach5.c index 87d514053..47460790c 100644 --- a/mach/powerpc/as/mach5.c +++ b/mach/powerpc/as/mach5.c @@ -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 * offset part. */ -- 2.34.1