https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104356
--- Comment #23 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 3 Feb 2022, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104356 > > --- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > flag_non_call_exceptions can be used even in C/C++ and other languages, so I'd > strongly prefer a new flag which will e.g. make it clearer what is it about, > will make it easier for grep for such dependencies etc. But then it doesn't make sense to create EH edges from integer divisions when the only exceptional case is invoking undefined behavior. I think we need to align what is undefined and what is exceptional, a new flag only makes the situation worse. The option besides making -fnon-call-exceptions do it would be to require the frontend to emit different GENERIC, aka some .DIV_WITH_EH_ON_ZERO or however we want to represent that.