iostreams icon indicating copy to clipboard operation
iostreams copied to clipboard

Bogus MSVC14.0 C4702 warning

Open Kojoley opened this issue 6 years ago • 4 comments

I do not see them from MSVC14.1.

boost\iostreams\detail\streambuf\indirect_streambuf.hpp(257) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(258) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(259) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(261) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(262) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(257) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(258) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(259) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(261) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(262) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(433) : warning C4702: unreachable code
boost\iostreams\detail\streambuf\indirect_streambuf.hpp(433) : warning C4702: unreachable code

Kojoley avatar Feb 28 '19 23:02 Kojoley

Can I have more information (boost version, etc)? Because here's the code I see:

screen shot 2019-02-28 at 5 12 39 pm

mclow avatar Mar 01 '19 01:03 mclow

boost version

develop branch

etc

I do not know what other information I can provide. It is exactly on those lines, it has to be a compiler bug because 14.1 does not produce those warnings, but I am not sure so posted as issue. If it ok I can open a PR with suppressing them otherwise I will just suppress the warning from the whole include on my side.

Kojoley avatar Mar 01 '19 01:03 Kojoley

Look at the AppVeyor CI builds where MSVC 14.0 (2015) is tested: https://ci.appveyor.com/project/eldiener/iostreams/builds/22626745 I only see:

c:\projects\boost-root\boost\test\impl\execution_monitor.ipp(1296) : warning C4702: unreachable code

Look at the regression test matrix for iostreams, for MSVC 14.0: https://www.boost.org/development/tests/develop/developer/iostreams.html I do not see it there (but I see what looks like 4 possibly bogus failure detections for MSVC 14.0.

It does not show up in our test environments. Please post a test and/or the git commit where you saw the issue so we can be looking at the correct code.

jeking3 avatar Mar 01 '19 12:03 jeking3

b2 variant=release address-model=64 cxxflags=/w14702 warnings-as-errors=on toolset=msvc-14.0 libs/spirit/classic/test//tree_to_xml

Kojoley avatar Mar 01 '19 12:03 Kojoley