This is the mail archive of the
mailing list for the GCC project.
firstname.lastname@example.org (Gabriel Dos Reis) wrote on 02.01.05 in <email@example.com>:
> Paul Schlie <firstname.lastname@example.org> 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
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 ;-)