This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix combiner issues with shifts (PR c/37924)
On Mon, Oct 27, 2008 at 10:22:42PM +0100, Jakub Jelinek wrote:
> On Mon, Oct 27, 2008 at 05:13:20PM -0400, Michael Meissner wrote:
> > However, your test code should declare a to be
> > signed char instead of char, since there are platforms where chars are unsigned
> > by default.
>
> I'm aware of that, that's why I've tested the testcase works with both
> -fsigned-char and -funsigned-char. I wanted to cover both signed char
> (on some arches) and unsigned char (on others).
I was just picking up on whether storing 0x80 would someday cause the test to
fail on different signed/unsigned char configurations (since 0x80 can't be fit
in a normal char), and I figured it was better to write type correct code to
have the meaning clear.
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com