This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -funsafe-loop-optimizations

> 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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]