Re: moused(8): char signed-ness problem with gcc 3.1

Bill Fenner <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
> 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;
}

  Bill

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.