This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Loop unrolling
- To: law at cygnus dot com
- Subject: Re: Loop unrolling
- From: John Carr <jfc at mit dot edu>
- Date: Tue, 02 Jun 1998 08:34:42 -0400
- cc: egcs at cygnus dot com
> If you can provide source examples which show C++ & Java creating empty
> loops behind the programmer's back it would go a long way to convincing
> everyone that eliminating empty loops is a good idea.
I sent this to RMS years ago during the original empty loop debate
(1991?) but he had already made up his mind. I don't remember if I
sent it to the gcc2 list.
struct x
{
x() {}
};
f()
{
x x1[10];
}
gcc's output contains an empty loop. If you want to complain about
the code style, assume that the empty constructor appears in a
read-only header file (possibly in a base class definition -- that's
where I first saw this bug).
(This also shows a deficiency in the SPARC machine description: there
is an unnecessary compare.)