-funsafe-loop-optimizations

Paul Schlie schlie@comcast.net
Sun Jan 2 01:12:00 GMT 2005


> Robert Dewar wrote:
>> Giovanni Bajo wrote:
>> Yes, this is why we could have a switch to disable generation of the runtime
>> checks. Still, I think that the overhead of runtime checks done once per loop
>> and "cold" code size increase are still bearable. I hope you will give it a
>> try.
>>
> As always, the issue is not whether these increases are bearable, the issue
> is whether the increases are worth while. Seems dubious in this case. Has
> anyone actually seen a legitimate case (other than a test program) that
> expects an infinite loop for this kind of case?

As I believe stated earlier, it would seem the compiler arguably has no
license to change semantics of the language; therefore if there is concern
that a potential circumstance may either likely be unintentional, and/or
prevent certain optimizations, then simply warn, nothing else; where then
the programmer has the option to either modify the code or not depending on
their true desire and understanding of it's implications.

(in either case, run-time loop checks would seem undesirable)




More information about the Gcc mailing list