[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: |
J Wunsch |
Subject: |
Re: [avr-gcc-list] What's wrong with this preprocessor statement |
Date: |
Tue, 27 Feb 2001 11:35:57 +0100 (MET) |
Denis Chertykov <address@hidden> wrote:
> Today it's not a true.
> Now GCC can optimize out such loops.
Out of curiosity: when does gcc optimize them out? All versions of
gcc i tried (AVR, FreeBSD/i386, Linux/i386, Solaris/Sparc,
HP-UX/PA-RISC, all of them were 2.95.2 versions) don't optimize it
away in the following file, not even with -O3 (which implies
-fstrength-reduce, which is documented to perform the loop variable
elimination):
void
foo(void)
{
int i;
for (i = 0; i < 10000; i++) ;
}
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j