stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Zhong" <Scott.Zh...@roguewave.com>
Subject RE: [PATCH] STDCXX-423
Date Mon, 11 Feb 2008 22:28:33 GMT
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:sebor@roguewave.com] 
Sent: Friday, February 01, 2008 12:16 PM
To: dev@stdcxx.apache.org
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;


Mime
View raw message