Modify

Opened 21 months ago

Last modified 16 months ago

#12078 new Bugs

Warnings in boost/core/swap.hpp when using nvcc

Reported by: Karl Ljungkvist <k.ljungkvist@…> Owned by: Peter Dimov
Milestone: To Be Determined Component: core
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

I get the following warning when I compile .cu files which uses the boost/core/swap.hpp file:

~/sw/boost/include/boost/core/swap.hpp(36): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "void boost_swap_impl::swap_impl(T &, T &) [with T=boost::signals2::detail::foreign_shared_ptr_impl_base *]" 
(56): here
            instantiation of "void boost::swap(T1 &, T2 &) [with T1=boost::signals2::detail::foreign_shared_ptr_impl_base *, T2=boost::signals2::detail::foreign_shared_ptr_impl_base *]" 
~/sw/boost/include/boost/signals2/detail/foreign_ptr.hpp(111): here

I get this even with the most recent git version (commit 3a94cde). The attached program gives this error when compiling like this:

nvcc -I ~/sw/boost/include test_swap.cu

I use CUDA 7.5 and g++ 4.9.2.

Attachments (1)

test_swap.cu (180 bytes) - added by Karl Ljungkvist <k.ljungkvist@…> 21 months ago.
Minimal example giving the warning

Download all attachments as: .zip

Change History (2)

Changed 21 months ago by Karl Ljungkvist <k.ljungkvist@…>

Attachment: test_swap.cu added

Minimal example giving the warning

comment:1 Changed 16 months ago by viboes

Component: Nonecore
Owner: set to Peter Dimov

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Peter Dimov.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.