This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Empty loop elimination in 4.0 ?
Hello,
> In the days of gcc-2.6.x the documentation of gcc said that empty loops
> were not eliminated. The docs used to say that this was on purpose -
> because empty loops were being used as delay loops.
>
> Does this ancient and not portable delay-loop hack still work with
> gcc version 4.0.0 20050102 (experimental) ?
yes. Although I think documentation about this was changed
and it is no longer guaranteed that the empty loops are not
removed. Also a patch for removing empty loops was submitted.
Zdenek