operator new catch parameter type gcc 4.3.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

What catch() parameter type should be used with operator new try/catch block?

gcc 4.3.2 objects to catch(std::bad_alloc &) but accepts catch(...) which I am told is not supported (and certainly
did not catch any exception I threw).

If I #include <c++/4.2.3/backward/new.h> catch(std::bad_alloc &) is accepted but presumably implements an old new
handler.

I cannot make operator new fail to check this (even allocating a terabyte succeeds) .

Does catch(...) work with the standard operator new in 4.3.2?

Thanks,

Jan




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux