This patch addresses PR tree-optimization/38943 where gcc may optimize
away trapping instructions even when -fnon-call-exceptions is specified.
Interestingly this only affects the C compiler (when -fexceptions is not
specified) as g++ (or -fexceptions) supports C++-style exception handling,
where
On Thu, Jul 8, 2021 at 11:54 AM Roger Sayle wrote:
>
>
> This patch addresses PR tree-optimization/38943 where gcc may optimize
> away trapping instructions even when -fnon-call-exceptions is specified.
> Interestingly this only affects the C compiler (when -fexceptions is not
> specified) as g++
> This patch has been tested on x86_64-pc-linux-gnu with a "make
> bootstrap" and "make -k check" with no new failures. This should
> be relatively safe, as there are no changes in behaviour unless
> the user explicitly specifies -fnon-call-exceptions, when the C
> compiler then behaves more like