RE: [AD] c++ test.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > Even with -fno-exceptions ?
> 
> Yes, this surprised me too.
> 
> I've attached gcc/libstdc++-v3/libsupc++/new_op.cc from the 
> GCC 3.3 tree.

Well, you can define your own global operator new in the example.
After all, it's simple and there's even a Scott Meyers approved
version which you can use without pilfering GCC's GPL version :)

Actually, I'm surprised about this bit:
> void *
> operator new (std::size_t sz) throw (std::bad_alloc)
I'd have thought they'd make something like:

#ifdef __EXCEPTIONS
#define THROW(foo) throw(foo)
#else
#define THROW(foo)
#endif

Or maybe

#ifdef __EXCEPTIONS
#define THROW(foo) throw(foo)
#else
#define THROW(foo) throw()
#endif

-- 
Vincent Penquerc'h 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/