Opened 15 years ago
Closed 12 years ago
#1507 closed Bugs (fixed)
[variant] C4512 warnings from VC8.0
Reported by: | Owned by: | ebf | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | variant |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Cc: |
Description
Variant produces a number of C4512 (assignment operator could not be generated) warnings when used in VC8 with warning level 4/code analysis enabled:
boost\variant\detail\apply_visitor_delayed.hpp(75) : warning C4512: 'boost::apply_visitor_delayed_t<Visitor>' : assignment operator could not be generated boost\variant\variant.hpp(894) : warning C4512: 'boost::detail::variant::invoke_visitor<Visitor>' : assignment operator could not be generated boost\variant\variant.hpp(1544) : warning C4512: 'boost::variant<T0_,T1,T2>::assigner' : assignment operator could not be generated boost\variant\variant.hpp(650) : warning C4512: 'boost::detail::variant::backup_assigner<Variant,RhsT>' : assignment operator could not be generated
The attached patch silences the warnings that i'm seeing in my project.
Attachments (7)
Change History (17)
by , 15 years ago
Attachment: | variant.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 14 years ago
When building in release mode, VC8/9 also produce some unreachable code warnings:
boost\variant\detail\visitation_impl.hpp(205) : warning C4702: unreachable code boost\variant\detail\visitation_impl.hpp(180) : warning C4702: unreachable code boost\variant\detail\visitation_impl.hpp(252) : warning C4702: unreachable code boost\variant\detail\visitation_impl.hpp(280) : warning C4702: unreachable code
Attached is a patch for visitation_impl.hpp that uses a pragma to silence these.
by , 14 years ago
Attachment: | visitation_impl.patch added |
---|
by , 13 years ago
Attachment: | variant_300509.diff added |
---|
comment:3 by , 13 years ago
Milestone: | To Be Determined → Boost 1.40.0 |
---|
It would be nice to have at least the 'unreachable code' and 'unreferenced parameter' warnings fixed in 1.40 (the unreferenced parameter warning in particular causes a lot of noise of VC9/10).
The 'assignment operator could not be generated' warnings are less important (i've taken to switching it off globally anyway).
comment:5 by , 13 years ago
Milestone: | Boost 1.40.0 → Boost 1.42.0 |
---|
Attached an updated patch based on running the current code in VC9.
by , 13 years ago
Attachment: | variant101109.patch added |
---|
comment:6 by , 13 years ago
The regression tests also cause a bunch of "possible loss of data" warnings that i haven't had a chance to look at. Build log attached if anyone is interested.
by , 13 years ago
Attachment: | variant.log added |
---|
follow-up: 8 comment:7 by , 13 years ago
There is also some
"warning C4535: calling _set_se_translator() requires /EHa "
warnings. As mentioned in the post @ http://old.nabble.com/Re%3A-Official-warnings-policy--p26288257.html, these can be fixed by setting the asynch-exceptions option in the variant jamfile.
by , 13 years ago
Attachment: | variantjam.diff added |
---|
comment:8 by , 13 years ago
Replying to Richard Webb <richard.webb@…>:
There is also some
"warning C4535: calling _set_se_translator() requires /EHa "
warnings. As mentioned in the post @ http://old.nabble.com/Re%3A-Official-warnings-policy--p26288257.html, these can be fixed by setting the asynch-exceptions option in the variant jamfile.
The right fix should be:
project
: requirements
<source>/boost/testminimal
;
comment:9 by , 13 years ago
Patches are now in Trunk, leaving open till they're in the release branch.
John.
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Running the variant regression tests on VC9 with warning level 4 produces a number of warnings in addition to the above:
Theres also an 'unreferenced parameter' warning: