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: Torsten Hahn
Subject: Re: [avr-gcc-list] avr-gcc bug ??
Date: Tue, 13 May 2003 18:34:46 +0200


Am Dienstag, 13.05.03, um 16:34 Uhr (Europe/Berlin) schrieb Christian Ludlam:

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

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list




oops, sure you are right. stupid mistake ... :(
--
Torsten Hahn / Chemnitzer Str. 4 / 09599 Freiberg
Tel.: 03731 775185 / mail: address@hidden



reply via email to

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