This is the mail archive of the
mailing list for the GCC project.
- From: Paul Schlie <schlie at comcast dot net>
- To: <gcc at gcc dot gnu dot org>
- Date: Sat, 01 Jan 2005 20:12:06 -0500
- Subject: 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
> 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)