avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] avr-gcc bug ??


From: Christian Ludlam
Subject: Re: [avr-gcc-list] avr-gcc bug ??
Date: Tue, 13 May 2003 15:34:44 +0100
User-agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.03) POPstar/2.05

On 13 May Torsten Hahn wrote:

>       for( i=count; i==0; i--)
>       {
>               printData( i, ram[i] );
>       }

Your condition is (i == 0) - it should be (i > 0). GCC has detected that this
loop can only possibly be executed once, if i is 0, and has omitted the loop.
By a similar method, GCC can also remove the entire statement without even a
warning.

HTH,

-- 
Christian Ludlam
address@hidden


reply via email to

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