Opened 7 years ago
Last modified 6 years ago
#11933 new Bugs
warnings in 1.60 when compiling with nvcc
Reported by: | 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
Change History (6)
comment:1 by , 7 years ago
comment:4 by , 6 years ago
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 by , 6 years ago
I'd rather not touch a working inline asm block. How about something like (void)tmp;
after that?
comment:6 by , 6 years ago
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.
I can repeat that this last warning appears for CUDA 7.5 when using BOOST.