This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Compiling with gcc-4.0.0 and -fno-exceptions


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.


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