egcs-2.91.66 PPC register bug
Richard Henderson
rth@cygnus.com
Wed Jun 30 23:07:00 GMT 1999
On Thu, Jun 24, 1999 at 01:08:52PM +0100, Ralph Schmidt wrote:
> Though a register content is defined as unsigned and a target variable
> is also marked unsigned it creates a signed value.
[...]
> struct Fubar
> {
> signed char A;
> };
But Fubar::A is signed, and there are specific rules for converting
between signed and unsigned, as in the assignment
> unsigned int A;
> A =(unsigned int) (((struct Fubar*)REG_PTR)->A);
The compiler is doing the right thing. You probably wanted
> A =(unsigned char) (((struct Fubar*)REG_PTR)->A);
r~
More information about the Gcc-bugs
mailing list