Martin, I just realized that I had worked on the wrong function.  Please
disregard the change I made on LIMITS.cpp.  I will continue to make
changes to compute_limits for this bug.

-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 12:16 PM
To: [email protected]
Subject: Re: [PATCH] STDCXX-423

Scott,

I think we might need some help understanding how this change
is intended to solve the problem with the padding bits. FYI,
unsigned char is the only type that may not have padding bits
so I'm not sure I see how it could help.

Martin

Scott Zhong wrote:
> Index: etc/config/src/LIMITS.cpp
> ===================================================================
> --- etc/config/src/LIMITS.cpp   (revision 616446)
> +++ etc/config/src/LIMITS.cpp   (working copy)
> @@ -216,8 +216,10 @@
>  {
>      unsigned bits = 0;
>  
> -    for (unsigned char c = '\01'; c; c <<= 1, ++bits);
> +    unsigned char pc = '\02'; // arbitrary value not equal to '\01'
>  
> +    for (unsigned char c = '\01'; c; c <<= 1) { if(c == pc) break; pc
=
> c; bits++; }
> +
>      printf ("#define _RWSTD_CHAR_BIT    %2u\n", bits);
>  
>      return bits;

Reply via email to