Closed cmigliorini closed 6 months ago
not sure exactly, but it's likely the zero_wrapper (for zero sized guards/ctions without capture). Can you try with -DBOOST_SML_CFG_DISABLE_MIN_SIZE
? Thanks.
That solved the problem, thanks! Should we just keep this now?
Great, thanks for sharing. This warning is a false positive in gcc 10.5 as there is no array indexing actually happening; the only reason this wknd is there is to have zero sized guards/actions if lambda without capture (which in C++ still needs sizeof 1), so there is an array wknd used to get it to zero were possible. So, as I see it you have a few options
#pragma GCC dignostics push
#pragma GCC dignostics ignore "-Warray-bounds"
#include <boost/sml.hpp>
#pragma GCC dignostics pop
So it depends on the trade-offs you are considering.
Thank you! I would have added the #pragma
if no answer came :), so now I can add it knowing it's truly a false positive -- btw this false positive from gcc also affect many code around, as I could see before I submitted this.
Hello, I can't seem to reproduce the following issue with a simple template (yet), but I thought perhaps someone else have encountered this so I'd create this ticket anyway.
Expected Behavior
SML compiles without warning
Actual Behavior
gcc 10.5.0.1 issues warnings such as
Steps to Reproduce the Problem
Unfortunately I was not able (yet) to recreate the problem outside of our private code.
Specifications