[Top][All Lists]

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

Re: [avr-gcc-list] I Think This Is A Bug

From: David Kelly
Subject: Re: [avr-gcc-list] I Think This Is A Bug
Date: Mon, 4 Apr 2005 22:12:27 -0500

On Apr 4, 2005, at 9:57 PM, Curtis Maloney wrote:

David Kelly wrote:
Avr-gcc doesn't doesn't fully evaluate this expression which should
reduce to 113. The FreeBSD version of gcc has no problem, but both the
FreeBSD ports version of avr-gcc and current WinAVR avr-gcc behave
identially (wrongly) the same:

Hello, and welcome to the world of "Not everyone uses 32bit ints.". AVR ints are 16bit. Pay attention to the warnings. Warnings are your friends.

Thanks! I couldn't see beyond the obvious large number and didn't think to tag the not-so-large constants. In the past with other compilers once one value got promoted to long the whole expression was evaluated long before being stuffed into the result.

David Kelly N4HHE, address@hidden
Whom computers would destroy, they must first drive mad.

reply via email to

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