This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix bootstrap comparison failures
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Sep 2002 23:06:58 +0100
- Subject: Re: fix bootstrap comparison failures
- References: <20020918213850.GA30722@redhat.com>
Richard Henderson wrote:-
> When starting from gcc 2.96 (or some other non-recent or non-gcc), we
> don't have a C99 compliant boolean. What we've got is regular integral
> type typedefed to bool. Which means that any time we rely on the
> properties of a C99 boolean, we're wrong.
Heh, I ran into this in cpplib about 2 months ago; we adopted the
convention of sticking with bool, but doing
!!sticky
in places like those below, FWIW.
Neil.
> {
> - bool sticky = false;
> + unsigned long sticky = 0;
> unsigned int i, ofs = 0;
>
> if (n >= HOST_BITS_PER_LONG)
> @@ -268,7 +268,7 @@ sticky_rshift_significand (r, a, n)
> r->sig[i] = 0;
> }
>
> - r->sig[0] |= sticky;
> + r->sig[0] |= (sticky != 0);
> }