-funsafe-loop-optimizations

Kai Henningsen kaih@khms.westfalen.de
Sun Jan 2 14:26:00 GMT 2005


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)

2. Option A, have the compiler insert checking code to make sure, at  
runtime, that what I asserted actually holds

3. Option B, have the compiler rely on my assertions for optimal  
optimization

4. While I don't see an obvious use, presumably someone will also want  
option C, ignore my assertions.

And yes, I know where to find Pascal ;-)

MfG Kai



More information about the Gcc mailing list