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 c++/23257] New: Incorrect exception-handling behavior with references


This program

===
struct Base {};
struct Derived : virtual Base {};

Derived derived;
Base base;

int main() {
  Base *b = &derived;

  try {
    try {
      throw b;
    } catch (Base*& br) {
      br = &base;
      throw;
    }
  } catch (Base*& br) {
    if (br != &base)
      return 1;
  }
}
===

should exit with code zero, but does not.

-- 
           Summary: Incorrect exception-handling behavior with references
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mmitchel at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23257


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