This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wconversion bug in g++-4.3?
On Nov 22, 2007 8:30 PM, Joe Buck <Joe.Buck@synopsys.com> wrote:
> On Fri, Nov 23, 2007 at 12:02:31AM +0100, Manuel López-Ibáñez wrote:
> > For this testcase:
...
> > unsigned short c = b & 0xff;
> The type of (b & 0xff) is int. However, the value is bounded, and must be
In a similar case with unsigned char, adding static_cast<unsigned
char(b &0xff) did not eliminate the warning.
-Tom
Tom Browder
Niceville, Florida
USA