[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug? |
Date: |
Tue, 18 Dec 2001 15:01:12 +0100 (MET) |
Chris Elmquist <address@hidden> wrote:
> In any case, here's my "improved" loop, suitable for fooling the optimizer
> today:
>
> void delay(void)
> {
> unsigned int d;
>
> for (d=0x1000; d; d--)
> __asm__ __volatile__ ( "nop" : : );
> }
If you already know about the volatile keyword, why don't you use it
just right?
void delay(void)
{
volatile unsigned int d;
for (d = 0x1000; d; d--)
;
}
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
[avr-gcc-list] 4-bit LCD source, Mike Jones, 2001/12/17
Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?, Dmitry, 2001/12/18
Re: [avr-gcc-list] GCC 3.0.2 unsigned int bug?, Carsten Beth, 2001/12/18