Empty loop elimination in 4.0 ?

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Jan 10 01:30:00 GMT 2005


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



More information about the Gcc mailing list