tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Incorrect shift result type with 64-bit ABI


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Incorrect shift result type with 64-bit ABI
Date: Fri, 6 Jul 2012 15:42:54 +0200
User-agent: KMail/1.13.7 (Linux/3.2.0-2-amd64; KDE/4.8.4; x86_64; ; )

Le vendredi 6 juillet 2012 14:25:54, Vincent Lefevre a écrit :
> On 2012-07-06 13:33:23 +0200, Vincent Lefevre wrote:
> > I've rewritten my tests to be added to the test suite and improved
> > them. They show that my patch was actually incorrect when the
> > first argument is unsigned short: the type should by int, not
> > unsigned int. This needs to be fixed...
> 
> Fixed in
> 
> http://repo.or.cz/w/tinycc.git/commit/d27a0b35482b907357d76a9db4e0b18ec89cf
> 979
> 
> on the "mob" branch.

Indeed, I failed to see this mistake. The result must be unsigned only if the 
first operand is unsigned and was not promoted. If it was promoted, then it 
will fit in an int and thus int must be used according to C99.

Thanks for the patch.

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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