[CC: obrien, who has been working on bringing in gcc 3.1]
At Wed, 15 May 2002 20:46:06 -0700,
Bill Fenner wrote:
> > So - yes - it seems gcc 3.1 does have a problem...
>
> Indeed - easily determined by breaking down the expression.
>
> So, who's gonna report it to gcc-bugs? knu?...
>
> int
> main()
> {
> unsigned char i = 127;
> char j;
>
> printf("%d\n", ((char)(i << 1)));
> j = ((char)(i << 1)) / 2;
> printf("%d\n", j);
> j = ((char)(i << 1));
> printf("%d\n", j / 2);
> return 0;
> }
Somehow, specifying -fsigned-char, which I thought was the default,
fixed the problem. So, the cause may be in our configuration of gcc?
I'll send-pr if it isn't.
--
/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp
"Somewhere out of a memory.. of lighted streets on quiet nights.."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message