From a2af9824d60b8a718d785775ae2fb3b529db2578 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 3 Sep 2008 08:57:48 +0000 Subject: [PATCH] Add a workaround for a possible gcc 4.3 optimiser bug. [SVN r48559] --- include/boost/asio/buffers_iterator.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/asio/buffers_iterator.hpp b/include/boost/asio/buffers_iterator.hpp index 2a88d38b..f9d61da7 100644 --- a/include/boost/asio/buffers_iterator.hpp +++ b/include/boost/asio/buffers_iterator.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -101,6 +102,9 @@ public: /// 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 @@ public: /// 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();