Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85977 - trunk/libs/coroutine/example/cpp03
From: oliver.kowalke_at_[hidden]
Date: 2013-09-28 02:15:48


Author: olli
Date: 2013-09-28 02:15:48 EDT (Sat, 28 Sep 2013)
New Revision: 85977
URL: http://svn.boost.org/trac/boost/changeset/85977

Log:
coroutine: fix noinline attribute for MSVC in segmented-stack example

Text files modified:
   trunk/libs/coroutine/example/cpp03/segmented_stack.cpp | 8 ++++++--
   1 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/libs/coroutine/example/cpp03/segmented_stack.cpp
==============================================================================
--- trunk/libs/coroutine/example/cpp03/segmented_stack.cpp Sat Sep 28 01:43:52 2013 (r85976)
+++ trunk/libs/coroutine/example/cpp03/segmented_stack.cpp 2013-09-28 02:15:48 EDT (Sat, 28 Sep 2013) (r85977)
@@ -7,11 +7,15 @@
 #include <iostream>
 
 #include <boost/assert.hpp>
+#include <boost/config.hpp>
 #include <boost/coroutine/all.hpp>
 #include <boost/thread.hpp>
 
-int count = 20;
-#if defined(BOOST_USE_SEGMENTED_STACKS)
+int count = 50;
+
+#ifdef BOOST_MSVC //MS VisualStudio
+__declspec(noinline) void access( char *buf);
+#else // GCC
 void access( char *buf) __attribute__ ((noinline));
 #endif
 void access( char *buf)


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