[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] What's wrong with this preprocessor statement
From: |
Denis Chertykov |
Subject: |
Re: [avr-gcc-list] What's wrong with this preprocessor statement |
Date: |
26 Feb 2001 23:09:41 +0300 |
address@hidden (J Wunsch) writes:
> Uwe Bonnes <address@hidden> wrote:
>
> > did you compile with optimization? Then perhaps the loop was
> > optimized away.
>
> ISTR a comment (somewhere in gcc's doc) that gcc never optimizes
> simple for() loops of the form:
>
> for (i = 0; i < NFOO; i++) ;
>
> because the compiler recognizes this as a form of a delay loop. Don't
> know whether this is also true for variations like while() loops of
> the same form.
Today it's not a true.
Now GCC can optimize out such loops.