tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Help! - bug in tinycc/tcc - (int8_t) not sign-extende


From: Dave Dodge
Subject: Re: [Tinycc-devel] Help! - bug in tinycc/tcc - (int8_t) not sign-extended to an unsigned, unless first placed in temporary
Date: Thu, 12 May 2005 07:46:06 -0400
User-agent: Mutt/1.4.2i

On Wed, May 11, 2005 at 09:48:33PM -0400, David A. Wheeler wrote:
> The basic problem is that if "num" is an unsigned (e.g., uint32_t),
> I believe an expression like this:
>  num == (int8_t) num
> should be true if num is 1 or 0xffffffdc,
> and NOT true if num is 0xfe or such. gcc does this.

This sounds similar to the sign-extension bug posted a few months
ago.  The patch given with the bug report seems to fix it (at least
for your test program).  See:

  http://lists.gnu.org/archive/html/tinycc-devel/2005-01/msg00013.html

BTW it doesn't look like this is in CVS.

                                                  -Dave Dodge




reply via email to

[Prev in Thread] Current Thread [Next in Thread]