id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9392,BOOST_NOINLINE NVCC in __HOST__,a.huebl@…,John Maddock," I am compiling with '''gcc 4.6.2''' and CUDA ('''nvcc 5.0''', V0.2.1221) causing an: {{{ include/boost/assert.hpp:102:47: Error: »noinline« was not defined in this scope }}} if I do '''not''' override with {{{ -DBOOST_NOINLINE='__attribute__ ((noinline))' }}} The problem resides at ''boost/config/suffix.hpp''. Affected files (using): - ''include/boost/assert.hpp'' - ''include/boost/log/detail/spin_mutex.hpp'' That's strange, since it works in code not included in {{{__host__}}} calls. Example to reproduce the problem: {{{ #include /* srand, rand */ #include /* time */ #include __host__ void abc() { int i = 3; BOOST_ASSERT_MSG( i%2 == 0, ""MYMESSAGE"" ); } int main() { srand (time(NULL)); int i = rand() % 10 + 1; BOOST_ASSERT_MSG( i%2 == 0, ""MYMESSAGE"" ); return 0; } }}} Compile with: - {{{nvcc main.cu}}} - {{{nvcc -DBOOST_NOINLINE='__attribute__ ((noinline))' main.cu}}} References: - [http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Function-Attributes.html gcc 3.1.1 attributes] (without the {{{__}}}) - [http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Function-Attributes.html gcc 4.6.2 attributes] (allowing the {{{__}}}) - [https://svn.boost.org/trac/boost/ticket/8849 boost 1.54:] {{{__attribute__((__visibility__(""default"")))}}} - [https://github.com/boostorg/utility/commit/b813232bba9a7f474e3efa3a2b9ad89cf874fa83#diff-b76ed5c8913bc58c7aeeaa522f48d702 boost 1.55:] ''BOOST_NOINLINE'' in ''assert.hpp'' ",Bugs,closed,To Be Determined,config,Boost 1.55.0,Problem,fixed,NOINLINE NVCC HOST,