Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 May 2002 20:46:06 -0700
From:      Bill Fenner <fenner@research.att.com>
To:        rivers@dignus.com
Cc:        audit@FreeBSD.ORG, knu@iDaemons.org, current@FreeBSD.ORG
Subject:   Re: moused(8): char signed-ness problem with gcc 3.1
Message-ID:  <200205160346.UAA27116@windsor.research.att.com>

next in thread | raw e-mail | index | archive | help

> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205160346.UAA27116>