From b0ed886eaaf62a1668c374d8362f9979184f66b6 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 13 Dec 2013 13:27:51 +0000 Subject: [PATCH] Fix for nvcc, see https://svn.boost.org/trac/boost/ticket/9392 --- include/boost/config/suffix.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 485a5bc5..25b0508f 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -558,7 +558,13 @@ namespace std{ using ::type_info; } # define BOOST_NOINLINE __declspec(noinline) # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) -# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# if defined(__CUDACC__) + // nvcc doesn't always parse __noinline__, + // see: https://svn.boost.org/trac/boost/ticket/9392 +# define BOOST_NOINLINE __attribute__ ((noinline)) +# else +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# endif # else # define BOOST_NOINLINE # endif