Modify

Opened 2 years ago

Last modified 19 months ago

#11933 new Bugs

warnings in 1.60 when compiling with nvcc

Reported by: Alex Grund <a.grund@…> Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.60.0 Severity: Cosmetic
Keywords: Cc:

Description

I'm compiling a larger project ( https://github.com/ComputationalRadiationPhysics/picongpu/ current dev) which uses boost heavily. However a lot of warnings are issued. Since we are quite agnostic to warnings (compiling with many warnings enabled and -Werror) this is troubling and it would be great, if those are fixed in future versions. If I remember correctly older versions (1.58) did not had them.

CUDA 7.0

boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp(49): warning: "cc" clobber ignored

boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp(65): warning: "cc" clobber ignored

boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp(91): warning: "cc" clobber ignored

boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp(75): warning: variable "tmp" was set but never used

CUDA 7.5

boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp(75): warning: variable "tmp" was set but never used

Attachments (0)

Change History (6)

comment:1 Changed 21 months ago by k.ljunngkvist@…

I can repeat that this last warning appears for CUDA 7.5 when using BOOST.

comment:2 Changed 19 months ago by anonymous

This issue is still present in Boost 1.61.0

comment:3 Changed 19 months ago by Peter Dimov

Can someone suggest a fix?

comment:4 Changed 19 months ago by anonymous

Idea would be to list 'tmp' as an input operand not as an output operand or using something like '"r" (new)' to create an unnamed register, although I'm not that firm in inline asm. (Background: The warning arises from an inline asm block, that uses compare-and-exchange where tmp is used as a temporary in that block but listed as an output param)

comment:5 Changed 19 months ago by Peter Dimov

I'd rather not touch a working inline asm block. How about something like (void)tmp; after that?

comment:6 Changed 19 months ago by Flamefire

Define 'working' if it mentions a temporary as an 'output' which should be either a new temporary register or an input if that is not possible. I'd consider this a bug and instead of crafting a work-around by 'using' an unused variable I'd rather fix that bug.

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.