This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: egcs at cygnus dot com
- Subject: Re: Loop unrolling
- From: Sol Foster <colomon at ralf dot org>
- Date: Thu, 11 Jun 1998 10:34:18 -0400
mrs@wrs.com (Mike Stump) wrote:
> The definition of loop means the use of the keyword ``for'' or
> ``while''.
So what's the word for "a piece of code that exhibits looping behaviour
but is generated automatically by the compiler"? I take it that the cases
are handled distinctly by EGCS.
> The definition of empty (in C and C++) means that textually
> in the users source program, the character ';' follows the ')' from
> the loop syntax.
Before or after the preprocessor runs on it? Is "while (1) {}" not an
empty loop?
> I know, somewhat arbitrary, but prefectly clear. This was the result
> of the conversation from eons ago that we had.
I was not aware that special, non-obvious meanings had been given to these
terms. Forgive me my earlier post on this subject.
So I take it that your opinion is that
for (i = 0; i < 10; i++);
should not be optimized away, but
inline void DoNothing () {}
for (i = 0; i < 10; i++) DoNothing ();
can be? I know that's fine with me.
--
Sol Foster: colomon@ralf.org
Sometimes I think the world has gone completely mad. And then I
think, "Aw, who cares?" And then I think, "Hey, what's for supper?"
-Jack Handey