This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

g++ exception handling bug


"operator delete" call while exception processing
is not implemented.

// --------------- Example:
#include<iostream.h>

struct A {
  A() {
    cerr<<"A constructing\n";
    throw 1;
  }
  void *operator new(unsigned sz) {
    cerr<<"A allocated\n";
    return ::operator new(sz);
  }
  void operator delete (void *p) {
    cerr<<"A deleted\n";
    ::operator delete (p);
  }
};

void main() {
  try {
     new A();
  } catch (...) {
  }
}

// ------------------------------------------------

This program does not type  "A deleted", but should.


--------
  Vladimir Belkin (vladimir.belkin@usa.net)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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