This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/82504] Optimize away exception allocation and throws handled by catch(...){}


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82504

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The example isn't very interesting because it's not very realistic code. To be
useful we need this to happen after inlining:

void foo() {
    throw 1;
}

void bar()
    try {
        foo();
    } catch(...) {}
}

If we can elide the exception when foo() is inlined into bar() then I agree it
would be a valuable optimization.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]