This is the mail archive of the gcc@gcc.gnu.org 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


On Jan 2, 2005, at 4:46 AM, Kai Henningsen wrote:

gdr@integrable-solutions.net (Gabriel Dos Reis) wrote on 02.01.05 in <m3652g8vtz.fsf@uniton.integrable-solutions.net>:

Paul Schlie <schlie@comcast.net> writes:

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


That makes the most sense to me.

From a purely programmer-centric view, what I'd like to be able to do (and
this is not just for loops) is the following:


1. Assert somehow which calculations are/aren't supposed to overflow/wrap
(where I care)

One important special case: overflow is undefined behavior for signed integer types. We have every right to assume that loop counters of type 'int' won't overflow.


--Matt


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