> > > > Well, it is a while since I looked deeper into EH code, but if I remember > > correctly we have EH region associated with statements and the non-call > > exceptions do not have EH region that is taken by EH code as an information > > that the statement was proved to not throw? In that case inlining could be > > safe, if the inlined statements are not placed in EH region (I think inliner > > does that) > > > > So perhaps this inlining is always safe? > > That's what I think. OK, as far as I can tell, Eric introduced the check in https://gcc.gnu.org/ml/gcc-patches/2010-05/msg01822.html
I am fine with it being relaxed and permitting inlining !non_call_exceptions to non_call_exceptions functions.. It would be also cool to have a testcases. Honza