boostorg / test

The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)
http://boost.org/libs/test
Boost Software License 1.0
182 stars 141 forks source link

Spectre mitigation warning on progress_monitor code #427

Open correaa opened 3 months ago

correaa commented 3 months ago

I am using Boost.Test (in header-only mode, using "included"), for a Boost-aspiring project https://github.com/correaa/boost-multi

I am getting this warning with MSVC 143:

D:\a\boost-multi\boost-multi\vcpkg\installed\x64-windows\include\boost\test\impl\progress_monitor.ipp(62): warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified [D:\a\boost-multi\boost-

https://github.com/correaa/boost-multi/actions/runs/10066511703/job/27828050365#step:9:62

FWIIW, this line has suspicious code as a variable is modified inside a condition: https://github.com/boostorg/test/blob/develop/include/boost/test/impl/progress_monitor.ipp#L61