Hi, I noticed that I had some problems with some nvcc (NVIDIA CUDA) versions and BOOST_NOINLINE. The logic for defining BOOST_NOINLINE seems to be the same as that of BOOST_FORCEINLINE, which does work correctly, so it seems to be a nvcc bug that's not fully compatible with GCC despite claiming to be. What would be the correct way to fix that?
On Wed, Jan 22, 2014 at 3:30 AM, Mathias Gaunard
Hi,
I noticed that I had some problems with some nvcc (NVIDIA CUDA) versions and BOOST_NOINLINE.
The logic for defining BOOST_NOINLINE seems to be the same as that of BOOST_FORCEINLINE, which does work correctly, so it seems to be a nvcc bug that's not fully compatible with GCC despite claiming to be.
What would be the correct way to fix that?
I suppose, you could just add: #define BOOST_NOINLINE to boost/config/compiler/nvcc.hpp, with a descriptive comment. When the macro is defined in the compiler's config, it won't be defined by suffix.hpp. How does the problem manifest itself though?
On 22/01/14 06:28, Andrey Semashev wrote:
I suppose, you could just add:
#define BOOST_NOINLINE
to boost/config/compiler/nvcc.hpp, with a descriptive comment. When the macro is defined in the compiler's config, it won't be defined by suffix.hpp.
How does the problem manifest itself though?
boost/assert.hpp uses BOOST_NOINLINE now, and it gives me the following errors: /home/nt2/dev/boost/trunk/boost/assert.hpp(102): warning: unknown attribute "__attribute__" /home/nt2/dev/boost/trunk/boost/assert.hpp:102: error: ‘noinline’ was not declared in this scope /home/nt2/dev/boost/trunk/boost/assert.hpp:103: warning: ‘__attribute__’ attribute directive ignored It looks as if nvcc is defining a __noinline__ macro to __attribute__((noinline)). In any case there was already a bug about this [1], but I'm not seeing this fixed in svn. [1] https://svn.boost.org/trac/boost/ticket/9392
In any case there was already a bug about this [1], but I'm not seeing this fixed in svn.
It won't ever be fixed in svn: svn is dead ;-) It is fixed in Git develop as mentioned in the bug report. Does this not fix things? John.
On 22/01/14 14:06, John Maddock wrote:
In any case there was already a bug about this [1], but I'm not seeing this fixed in svn.
It won't ever be fixed in svn: svn is dead ;-)
It is fixed in Git develop as mentioned in the bug report. Does this not fix things?
It does, I'm just not used to the new system yet.
participants (3)
-
Andrey Semashev
-
John Maddock
-
Mathias Gaunard