Compiling with gcc-4.0.0 and -fno-exceptions
Daniel Kegel
dank@kegel.com
Tue Jun 7 05:34:00 GMT 2005
gcc-4.0.0 tends to complain about the trick used in exception_defines.h
to define away catch and throw. I think I'm going to have to
apply several changes like this:
--- bits/stl_uninitialized.h.old 2005-06-06 22:27:47.000000000 -0700
+++ bits/stl_uninitialized.h 2005-06-06 22:28:04.000000000 -0700
@@ -86,11 +86,13 @@
std::_Construct(&*__cur, *__first);
return __cur;
}
+#ifdef __EXCEPTIONS
catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
+#endif
}
/**
to avoid errors like
.../include/c++/4.0.0/bits/stl_uninitialized.h:
In member function
'void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, const _Tp&)
[with _Tp = TestHarness::Type, _Alloc = std::allocator<TestHarness::Type>]':
.../include/c++/4.0.0/bits/stl_uninitialized.h:113:
warning: control may reach end of non-void function
'_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, __false_type)
[with _InputIterator = __gnu_cxx::__normal_iterator<TestHarness::Type*, std::vector<TestHarness::Type, std::allocator<TestHarness::Type> > >,
_ForwardIterator = __gnu_cxx::__normal_iterator<TestHarness::Type*, std::vector<TestHarness::Type, std::allocator<TestHarness::Type> > >]'
being inlined
when building my apps.
If that sounds about right, I can submit a bug report / patch
for the things I've run into.
More information about the Libstdc++
mailing list