This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix bootstrap comparison failures


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);
>  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]