diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | awk.h | 6 | ||||
-rw-r--r-- | awkgram.c | 4 | ||||
-rw-r--r-- | awkgram.y | 4 | ||||
-rw-r--r-- | debug.c | 2 | ||||
-rw-r--r-- | eval.c | 2 |
6 files changed, 20 insertions, 9 deletions
@@ -1,3 +1,14 @@ +2020-07-28 Arnold D. Robbins <arnold@skeeve.com> + + Eliminate 'iszero: redefined' warning from tcc. + + * awk.h (is_zero): Renamed from `iszero'. + (boolval): Update usage. + * awkgram.y [GRAMMAR]: Ditto. + (negate_num): Ditto. + * debug.c (condition_triggered): Ditto. + * eval.c (set_LINT): Ditto. + 2020-07-26 Arnold D. Robbins <arnold@skeeve.com> * awkgram.c, command.c: Regenerated with Bison 3.7. @@ -1307,7 +1307,7 @@ DEREF(NODE *r) #define get_number_uj(n) numtype_choose((n), mpfr_get_uj((n)->mpg_numbr, ROUND_MODE), (uintmax_t) mpz_get_d((n)->mpg_i), (uintmax_t) (n)->numbr) -#define iszero(n) numtype_choose((n), mpfr_zero_p((n)->mpg_numbr), (mpz_sgn((n)->mpg_i) == 0), ((n)->numbr == 0.0)) +#define is_zero(n) numtype_choose((n), mpfr_zero_p((n)->mpg_numbr), (mpz_sgn((n)->mpg_i) == 0), ((n)->numbr == 0.0)) #define IEEE_FMT(r, t) (void) (do_ieee_fmt && format_ieee(r, t)) @@ -1325,7 +1325,7 @@ DEREF(NODE *r) #define is_mpg_number(n) 0 #define is_mpg_float(n) 0 #define is_mpg_integer(n) 0 -#define iszero(n) ((n)->numbr == 0.0) +#define is_zero(n) ((n)->numbr == 0.0) #endif #define var_uninitialized(n) ((n)->var_value == Nnull_string) @@ -1983,7 +1983,7 @@ boolval(NODE *t) { (void) fixtype(t); if ((t->flags & NUMBER) != 0) - return ! iszero(t); + return ! is_zero(t); return (t->stlen > 0); } @@ -3059,7 +3059,7 @@ regular_loop: if (yyvsp[-1] != NULL) { NODE *n = yyvsp[-1]->nexti->nexti->memory; - if ((n->flags & (STRING|STRCUR)) != 0 || ! iszero(n)) + if ((n->flags & (STRING|STRCUR)) != 0 || ! is_zero(n)) goto regular_print; bcfree(yyvsp[-1]->lasti); /* Op_field_spec */ @@ -4901,7 +4901,7 @@ negate_num(NODE *n) #ifdef HAVE_MPFR if (is_mpg_integer(n)) { - if (! iszero(n)) { + if (! is_zero(n)) { mpz_neg(n->mpg_i, n->mpg_i); return; } @@ -1154,7 +1154,7 @@ simple_stmt if ($3 != NULL) { NODE *n = $3->nexti->nexti->memory; - if ((n->flags & (STRING|STRCUR)) != 0 || ! iszero(n)) + if ((n->flags & (STRING|STRCUR)) != 0 || ! is_zero(n)) goto regular_print; bcfree($3->lasti); /* Op_field_spec */ @@ -2399,7 +2399,7 @@ negate_num(NODE *n) #ifdef HAVE_MPFR if (is_mpg_integer(n)) { - if (! iszero(n)) { + if (! is_zero(n)) { mpz_neg(n->mpg_i, n->mpg_i); return; } @@ -1616,7 +1616,7 @@ condition_triggered(struct condition *cndn) return false; /* not triggered */ force_number(r); - di = ! iszero(r); + di = ! is_zero(r); DEREF(r); return di; } @@ -976,7 +976,7 @@ set_LINT() } } } else { - if (! iszero(n)) + if (! is_zero(n)) do_flags |= DO_LINT_ALL; } |