Empty loop elimination in 4.0 ?

Andrew Pinski pinskia@physics.uc.edu
Mon Jan 10 14:34:00 GMT 2005


On Jan 10, 2005, at 9:12 AM, Oscar Fuentes wrote:

> Robert Dewar <dewar@adacore.com> writes:
>
>> I think it is always a good idea to generate a warning
>> when an empty loop is detected (whether or not it is
>> eliminated), since this is either a timing loop, or it
>> is likely a bug.
>
> Not in C++.

Or even in C now a days with all the optimizations we could do like
converting some loops to memset which still keeps the loop because it is
ideal to have later passes delete the loop.

-- Pinski



More information about the Gcc mailing list