Boost C++ Libraries: Ticket #6429: Wrong range checks in compiler/visualc.hpp https://svn.boost.org/trac10/ticket/6429 <p> There is a problem with the range checks, in particular they don't recognize the MIPS cross-compiler of VC8 correctly. This problem is present in the trunk but also in older released versions. I found the issue ininially in 1.48. </p> <p> The problem there is caused by checks like _MSC_VER==1400 or _MSC_VER&gt;1400. For the mentioned compiler, _MSC_VER is 1401 and it is bug-to-bug compatible with other 140x versions. Still, above checks fail to recognize it as such. The tests should be changed to _MSC_VER&lt;1400 or _MSC_VER&gt;=1400, with the assumption that all 14xx versions are compatible. </p> <p> Some more notes: </p> <ul><li>This doesn't only affect version 140x, but also others, see e.g. the code for versions 1200, 1201 and 1202. </li><li>I think this file merits a list of known _MSC_VER values and the according systems, or a pointer to it, and a note why _MSC_VER==1400 is bad. </li><li>Near the bottom, there is a check that tests &lt;1200 to reject those pre-VC6 compilers right away. I'd move that up to the top, because it is required context to fully understand the rest of the file. </li><li>There is a #pragma that disables a warning "..before we #include anything", but this file doesn't include anything. I'm wondering if that couldn't simply be removed or at least moved. </li><li>There are a few cases where preprocessor code isn't indented. </li><li>There is a comment "disable min/max macro defines on vc6:" but no code associated with that. I guess the code was rendered obsolete, at least I don't see any NOMINMAX define there. </li><li>There is a macro BOOST_MSVC_FULL_VER, but that macro is not used there. Unless this is unused, I'd add a comment or reference to the according documentation. </li><li>There is one check that BOOST_MSVC == 1202. Why does that use BOOST_MSVC instead of _MSC_VER? I'd also comment that, I think this was due to some fault in the ARM cross-compiler for CE5, but I also seem to remember that there was a workaround. I'll try to see if I can recover the exact case from STLport's history/documentation, where I think the workaround originated. </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6429 Trac 1.4.3 John Maddock Fri, 20 Jan 2012 18:18:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6429#comment:1 https://svn.boost.org/trac10/ticket/6429#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76595" title="Fix _MSC_VER version checks are current form doesn't work for MIPS ...">[76595]</a>) Fix _MSC_VER version checks are current form doesn't work for MIPS cross compiler. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6429" title="#6429: Bugs: Wrong range checks in compiler/visualc.hpp (closed: fixed)">#6429</a>. </p> Ticket Ulrich Eckhardt <ulrich.eckhardt@…> Mon, 23 Jan 2012 09:03:24 GMT attachment set https://svn.boost.org/trac10/ticket/6429 https://svn.boost.org/trac10/ticket/6429 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">CE-versions.patch</span> </li> </ul> Ticket Ulrich Eckhardt <ulrich.eckhardt@…> Mon, 23 Jan 2012 09:11:34 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/6429#comment:2 https://svn.boost.org/trac10/ticket/6429#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Thank you for the quick response! I would have filed patches but first wanted to gauge interest and whether to clean up the file along the way. There are a few checks missing though, see attached patch. </p> Ticket John Maddock Sun, 29 Jan 2012 12:57:00 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6429#comment:3 https://svn.boost.org/trac10/ticket/6429#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76774" title="Apply version check patch. Fixes #6429.">[76774]</a>) Apply version check patch. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6429" title="#6429: Bugs: Wrong range checks in compiler/visualc.hpp (closed: fixed)">#6429</a>. </p> Ticket