Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2008-09-03 04:57:48


Author: chris_kohlhoff
Date: 2008-09-03 04:57:48 EDT (Wed, 03 Sep 2008)
New Revision: 48559
URL: http://svn.boost.org/trac/boost/changeset/48559

Log:
Add a workaround for a possible gcc 4.3 optimiser bug.

Text files modified:
   trunk/boost/asio/buffers_iterator.hpp | 7 +++++++
   1 files changed, 7 insertions(+), 0 deletions(-)

Modified: trunk/boost/asio/buffers_iterator.hpp
==============================================================================
--- trunk/boost/asio/buffers_iterator.hpp (original)
+++ trunk/boost/asio/buffers_iterator.hpp 2008-09-03 04:57:48 EDT (Wed, 03 Sep 2008)
@@ -21,6 +21,7 @@
 #include <cstddef>
 #include <boost/assert.hpp>
 #include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
 #include <boost/iterator/iterator_facade.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/add_const.hpp>
@@ -101,6 +102,9 @@
 
   /// Construct an iterator representing the beginning of the buffers' data.
   static buffers_iterator begin(const BufferSequence& buffers)
+#if BOOST_WORKAROUND(__GNUC__, == 4) && BOOST_WORKAROUND(__GNUC_MINOR__, == 3)
+ __attribute__ ((noinline))
+#endif
   {
     buffers_iterator new_iter;
     new_iter.begin_ = buffers.begin();
@@ -118,6 +122,9 @@
 
   /// Construct an iterator representing the end of the buffers' data.
   static buffers_iterator end(const BufferSequence& buffers)
+#if BOOST_WORKAROUND(__GNUC__, == 4) && BOOST_WORKAROUND(__GNUC_MINOR__, == 3)
+ __attribute__ ((noinline))
+#endif
   {
     buffers_iterator new_iter;
     new_iter.begin_ = buffers.begin();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk