[PATCH] Add divide by zero side effect.

Andrew MacLeod amacleod@redhat.com
Wed May 18 20:24:06 GMT 2022


On 5/18/22 14:13, Segher Boessenkool wrote:
> On Tue, May 17, 2022 at 02:39:11PM -0400, Andrew MacLeod via Gcc-patches wrote:
>> I haven't checked this patch in yet.  This implements a side effect that
>> the divisor cannot be 0 after a divide executes. This allows us to fold
>> the divide away:
> "Side effect" already has a meaning, very commonly used in language
> theory, and even in the C standard itself: a function has a side effect
> if it does something more than just return a value: if it changes state.
> This can be some I/O, or it can just be writing to some non-local data.
>
> Side effects are crucial to what a compiler does, and they are used all
> over the place (the gcc/ dir has some thousand mentions of it for
> example).
>
> Please don't make life hard for everyone by overloading this term.
>
I'm open to suggestions for a better term!

Is there a commonly used alternate term to describe an observable effect 
on the value of an input operand?

Andrew




More information about the Gcc-patches mailing list